diff --git a/.github/workflows/check_action.yml b/.github/workflows/check_action.yml new file mode 100644 index 0000000..1040e7e --- /dev/null +++ b/.github/workflows/check_action.yml @@ -0,0 +1,21 @@ +name: check_action +on: + push: + paths: + - action.yml + pull_request: + paths: + - action.yml + +jobs: + test_action: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + + - name: check gitdeps action on ${{ matrix.os }} + uses: ./ \ No newline at end of file diff --git a/action.yml b/action.yml index 28988a2..ced0845 100644 --- a/action.yml +++ b/action.yml @@ -8,7 +8,7 @@ inputs: gitdeps_args: description: 'add gitdeps arguments' required: false - default: '' + runs: using: 'composite' steps: @@ -32,7 +32,6 @@ runs: shell: bash if: runner.os == 'macOS' run: | - set -e VERSION="${{ inputs.gitdeps_ver }}" OS_ARCH=$(uname -m | sed 's/aarch64/arm64/' | sed 's/x86_64/amd64/') BASE_NAME="gitdeps_${VERSION}_darwin_${OS_ARCH}" @@ -98,7 +97,9 @@ runs: - name: run gitdeps (Unix) shell: bash if: runner.os != 'Windows' - run: .gitdeps/${BASE_NAME}/gitdeps ${{ inputs.gitdeps_args }} + env: + GITDEPS_ARGS: ${{ inputs.gitdeps_args }} + run: .gitdeps/${BASE_NAME}/gitdeps $GITDEPS_ARGS - name: run gitdeps (Windows) shell: pwsh