Skip to content

Commit

Permalink
Merge branch 'angadhn:master' into inertia-2-retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Joosty authored Sep 6, 2024
2 parents 864d646 + e5bede8 commit 8fb9aec
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Sync with Master

on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches:
- master

jobs:
check-sync:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0 # Fetch all history for all branches and tags

- name: Fetch main branch
run: |
git fetch origin master
- name: Check if branch is up-to-date with master
run: |
git merge-base --is-ancestor origin/master HEAD
- name: Fail if not up-to-date
if: failure()
run: |
echo "The branch is not up-to-date with main. Please rebase or merge main into your branch."
exit 1

0 comments on commit 8fb9aec

Please sign in to comment.