New security helmet and coat #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Master Merged | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
check-master-merged: | |
runs-on: ubuntu-latest | |
if: github.head_ref == 'merge-upstream' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Fetch head branch | |
run: git fetch origin ${{ github.head_ref }} | |
- name: Check if master is merged | |
run: | | |
git checkout ${{ github.head_ref }} | |
if git merge-base --is-ancestor origin/${{ github.base_ref }} HEAD; then | |
exit 0 | |
else | |
echo "Base branch is NOT merged into the head branch. Merge base branch to keep CI checks relevant." | |
exit 1 | |
fi |