Skip to content

Commit

Permalink
fix: add git workaround [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Oct 8, 2024
1 parent fc453f2 commit 3047fd5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/insider-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
run: . get_pr.sh

- name: Setup Node.js environment
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
run: . get_pr.sh

- name: Setup Node.js environment
uses: actions/setup-node@v4
Expand Down
5 changes: 5 additions & 0 deletions get_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

# git workaround
if [[ "${CI_BUILD}" != "no" ]]; then
git config --global --add safe.directory "/__w/$( echo "${GITHUB_REPOSITORY}" | awk '{print tolower($0)}' )"
fi

if [[ -n "${PULL_REQUEST_ID}" ]]; then
BRANCH_NAME=$( git rev-parse --abbrev-ref HEAD )

Expand Down

0 comments on commit 3047fd5

Please sign in to comment.