Skip to content

Commit e396e98

Browse files
committed
add variable
1 parent ee48a9a commit e396e98

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

template/.github/workflows/build.yml.j2

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ jobs:
349349
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
350350
env:
351351
PR_NUMBER: ${{ github.event.pull_request.number }}
352-
run: cargo set-version --offline --workspace 0.0.0-pr${PR_NUMBER}
352+
run: |
353+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
354+
cargo set-version --offline --workspace "$PR_VERSION"
353355
- name: Update version if PR against non-main branch
354356
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
355357
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
@@ -426,7 +428,9 @@ jobs:
426428
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
427429
env:
428430
PR_NUMBER: ${{ github.event.pull_request.number }}
429-
run: cargo set-version --offline --workspace 0.0.0-pr${PR_NUMBER}
431+
run: |
432+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
433+
cargo set-version --offline --workspace "$PR_VERSION"
430434
- name: Update version if PR against non-main branch
431435
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
432436
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}

0 commit comments

Comments
 (0)