diff --git a/.github/workflows/reftest.yml b/.github/workflows/reftest.yml index fc204e5728cb..c80516db49aa 100644 --- a/.github/workflows/reftest.yml +++ b/.github/workflows/reftest.yml @@ -7,10 +7,16 @@ jobs: ref-print: runs-on: ubuntu-latest steps: - - name: github.base_ref - run: echo github.base_ref=${{ github.base_ref }} - - name: github.merge_group.base_ref - run: echo github.event.merge_group.base_ref=${{ github.event.merge_group.base_ref }} + - 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"