diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e55546..3e3f00c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,25 @@ on: - '**' jobs: - test: + shellcheck: + name: Run shellcheck runs-on: ubuntu-latest - name: Test verify-changed-files + steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2 - name: shellcheck uses: reviewdog/action-shellcheck@v1.9 + test: + name: Test verify-changed-files + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022, windows-2016] + steps: + - name: Checkout + uses: actions/checkout@v2 - name: Test sql file has no changes uses: ./ id: changed_files_not_expected diff --git a/action.yml b/action.yml index e6ab442..86d0a17 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,7 @@ runs: id: verify-changed-files shell: bash env: + GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_REPOSITORY: ${{ github.repository }} # INPUT_ is not available in Composite run steps # https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611 diff --git a/entrypoint.sh b/entrypoint.sh index 87cc656..55f1ca1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,9 @@ set -e -git remote add temp_verify_changed_files "https://${INPUT_TOKEN}@github.com/${GITHUB_REPOSITORY}" +SERVER_URL=$(echo "$GITHUB_SERVER_URL" | awk -F/ '{print $3}') + +git remote add temp_verify_changed_files "https://${INPUT_TOKEN}@${SERVER_URL}/${GITHUB_REPOSITORY}" CHANGED_FILES=()