Skip to content

Update check-sync.yml #10

Update check-sync.yml

Update check-sync.yml #10

Workflow file for this run

name: Check Sync with Master
on:
pull_request:
types: [synchronize, opened, reopened]
jobs:
check-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Fetch master branch
run: git fetch origin master
- name: Check if branch is up-to-date with master
id: check_sync
run: |
git merge-base --is-ancestor origin/master HEAD
continue-on-error: true
- name: Fail if not up-to-date
if: steps.check_sync.outcome == 'failure'
run: |
echo "The branch is not up-to-date with master. Please rebase or merge master into your branch."
exit 1