fix: add git workaround [skip ci]

This commit is contained in:
Baptiste Augrain 2024-10-08 14:06:42 +02:00
parent fc453f25f8
commit 3047fd50fb
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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 )