Skip to content

Commit

Permalink
Fixed bug setting the server URL for github enterprise server (#78)
Browse files Browse the repository at this point in the history
* Fixed bug setting the server URL for github enterprise server

* Update action.yml

* Update test.yml

* Update test.yml

* Update test.yml
  • Loading branch information
jackton1 committed Sep 26, 2021
1 parent 3e40544 commit 79e45e8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
id: verify-changed-files
shell: bash
env:
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.saobby.my.eu.orgmunity/t/input-variable-name-is-not-available-in-composite-run-steps/127611
Expand Down
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=()

Expand Down

0 comments on commit 79e45e8

Please sign in to comment.