From fa10a1ded5b747e9db6d6c1942fceb279f1abedc Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 4 Apr 2025 10:48:58 +0200 Subject: [PATCH] ci: Use GITHUB_BASE_REF over hard-coded master --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae2ade3f5c..1d6521a3f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,7 @@ jobs: fi echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD $EXCLUDE_MERGE_BASE_ANCESTORS | head -1)" >> "$GITHUB_ENV" - run: | - git fetch origin master + git fetch origin "${GITHUB_BASE_REF}" git config user.email "ci@example.com" git config user.name "CI" - run: | @@ -81,7 +81,7 @@ jobs: - name: Compile and run tests run: | # Run tests on commits after the last merge commit and before the PR head commit - git rebase --exec "git merge --no-commit origin/master && ./.github/ci-test-each-commit-exec.sh && git reset --hard" ${{ env.TEST_BASE }} + git rebase --exec "git merge --no-commit origin/${GITHUB_BASE_REF} && ./.github/ci-test-each-commit-exec.sh && git reset --hard" ${{ env.TEST_BASE }} macos-native-arm64: name: ${{ matrix.job-name }}