Skip to content

Commit

Permalink
Merge pull request #20061 from kaspar030/fix-github-ref
Browse files Browse the repository at this point in the history
ci: fix github.base-ref for merge_group builds
  • Loading branch information
kaspar030 authored Nov 8, 2023
2 parents cd97805 + 0b1a3e4 commit 7a6d63f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
run: |
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"
check-commits-success:
needs: check-commits
if: github.event_name != 'merge_group'
# needs: check-commits
runs-on: ubuntu-latest
steps:
- name: check-commits succeeded
run: exit 0
if: github.event_name == 'merge_group'
run: exit 1
22 changes: 22 additions & 0 deletions .github/workflows/reftest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ref-print
on:
pull_request:
merge_group:

jobs:
ref-print:
runs-on: ubuntu-latest
steps:
- name: set CI_BASE_BRANCH
run: |
if [ -n "${{ github.base_ref }}" ]; then
echo "CI_BASE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
elif [ -n "${{ github.event.merge_group.base_ref }}" ]; then
echo "CI_BASE_BRANCH=${{ github.event.merge_group.base_ref }}" | sed s.=refs/heads/.=. >> $GITHUB_ENV
fi
- name: echo CI_BASE_BRANCH
run: echo CI_BASE_BRANCH=$CI_BASE_BRANCH
- name: fail-if
if: github.event_name == 'merge_group'
run: "false"

0 comments on commit 7a6d63f

Please sign in to comment.