Skip to content

Commit

Permalink
Merge pull request #146 from aquaproj/fix/fix-windows-action
Browse files Browse the repository at this point in the history
fix: fix GitHub Actions for Windows
  • Loading branch information
suzuki-shunsuke authored Aug 6, 2022
2 parents af14368 + c12bc8b commit 7e0d068
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test-actions-windows-bash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: test-actions-windows-bash
on:
push:
branches: [main]
tags: [v*]
pull_request:
branches: [main]
jobs:
normal:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
aqua_version: v1.18.0
- run: command -v aqua
shell: bash
- run: aqua -v
shell: bash
- run: actionlint -version
shell: bash
working-directory: tests
working_dir:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
aqua_version: v1.18.0
working_directory: tests
- run: command -v aqua
shell: bash
- run: aqua -v
shell: bash
- run: github-comment -v
shell: bash
working-directory: tests
set-relative-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
aqua_version: v1.18.0
install_path: bin/aqua.exe
working_directory: tests
- run: tests/bin/aqua.exe -v
shell: bash
9 changes: 8 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ runs:
- run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH
shell: bash
working-directory: ${{ inputs.working_directory }}
if: inputs.enable_aqua_install == 'true'
if: inputs.enable_aqua_install == 'true' && runner.os != 'Windows'

- run: |
echo "${AQUA_ROOT_DIR:-$HOME/AppData/Local/aquaproj-aqua}/bin" >> $GITHUB_PATH
echo "${AQUA_ROOT_DIR:-$HOME/AppData/Local/aquaproj-aqua}/bat" >> $GITHUB_PATH
shell: bash
working-directory: ${{ inputs.working_directory }}
if: inputs.enable_aqua_install == 'true' && runner.os == 'Windows'
- run: bash "${{github.action_path}}/action.sh"
working-directory: ${{ inputs.working_directory }}
Expand Down
2 changes: 1 addition & 1 deletion aqua-installer
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ARCH="$(uname_arch)"

install_path=${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin/aqua
if [ "$OS" = windows ]; then
install_path=${AQUA_ROOT_DIR:-$HOME/AppData/Local/aquaproj-aqua}/bin/aqua
install_path=${AQUA_ROOT_DIR:-$HOME/AppData/Local/aquaproj-aqua}/bin/aqua.exe
fi

while getopts i:v: OPT
Expand Down

0 comments on commit 7e0d068

Please sign in to comment.