From f8296847a4e0adc430772affbfa184f4be257732 Mon Sep 17 00:00:00 2001 From: Sean McGary Date: Fri, 22 Nov 2024 14:23:27 -0600 Subject: [PATCH] Check on PRs only --- .github/workflows/check-merge.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-merge.yml b/.github/workflows/check-merge.yml index 00460a32..60b319aa 100644 --- a/.github/workflows/check-merge.yml +++ b/.github/workflows/check-merge.yml @@ -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 @@ -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