Skip to content

ci: fix github.base-ref for merge_group builds #5

ci: fix github.base-ref for merge_group builds

ci: fix github.base-ref for merge_group builds #5

Workflow file for this run

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"