Skip to content

Commit

Permalink
Check on PRs only
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Nov 22, 2024
1 parent a1a6996 commit f829684
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/check-merge.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: check-pr-merge
on:
push:
branches-ignore:
- master
pull_request:
branches:
- '**'
- '!master'
- master
- "release/*"
jobs:
check-merge:
runs-on: ubuntu-latest
Expand All @@ -12,7 +15,8 @@ jobs:
uses: actions/checkout@v4
- name: Check if branch is up to date
run: |
res=$(git --no-pager log HEAD..origin/master --oneline)
baseRef=origin/${{ github.base_ref }}
res=$(git --no-pager log HEAD..$baseRef --oneline)
if [[ -z "$res" ]]; then
echo "Branch is up to date with master"
else
Expand Down

0 comments on commit f829684

Please sign in to comment.