From ee48a9acb5312c88e68f956c551c9f6961792bdb Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy <1712947+adwk67@users.noreply.github.com> Date: Tue, 10 Dec 2024 19:06:35 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> --- template/.github/workflows/build.yml.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/template/.github/workflows/build.yml.j2 b/template/.github/workflows/build.yml.j2 index 89b520bd..5c7ab3f4 100644 --- a/template/.github/workflows/build.yml.j2 +++ b/template/.github/workflows/build.yml.j2 @@ -347,7 +347,9 @@ jobs: bin: cargo-set-version - name: Update version if PR against main branch if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }} - run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: cargo set-version --offline --workspace 0.0.0-pr${PR_NUMBER} - name: Update version if PR against non-main branch # For PRs to be merged against a release branch, use the version that has already been set in the calling script. if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }} @@ -422,7 +424,9 @@ jobs: bin: cargo-set-version - name: Update version if PR against main branch if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }} - run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: cargo set-version --offline --workspace 0.0.0-pr${PR_NUMBER} - name: Update version if PR against non-main branch # For PRs to be merged against a release branch, use the version that has already been set in the calling script. if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}