From 508ef8815692b1a39994db5619d47adcb4eb4586 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Tue, 28 Jan 2025 16:53:21 +0100 Subject: [PATCH] fix: make conditions mutually exclusive --- template/.github/workflows/build.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/.github/workflows/build.yml.j2 b/template/.github/workflows/build.yml.j2 index 2bfbad0f..92dc4c25 100644 --- a/template/.github/workflows/build.yml.j2 +++ b/template/.github/workflows/build.yml.j2 @@ -356,7 +356,7 @@ jobs: # For PRs to be merged against a release branch, use the version that has already been set in the calling script. # We can't rely on cargo set-version here as we will break semver rules when changing the version to make it # specific to this PR e.g. 1.2.0 --> 1.2.0-pr678, so set it manually. - if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main' }} env: PR_NUMBER: ${{ github.event.pull_request.number }} shell: bash @@ -440,7 +440,7 @@ jobs: # For PRs to be merged against a release branch, use the version that has already been set in the calling script. # We can't rely on cargo set-version here as we will break semver rules when changing the version to make it # specific to this PR e.g. 1.2.0 --> 1.2.0-pr678, so set it manually. - if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main' }} env: PR_NUMBER: ${{ github.event.pull_request.number }} shell: bash