Skip to content

Commit 27f2b95

Browse files
chore: Update templated files (8e7969c) (#899)
chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@8e7969c Reference-to: stackabletech/operator-templating@8e7969c (Fix workflow branch condition)
1 parent 6c1b168 commit 27f2b95

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/build.yml

+16-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ on:
1313
- trying
1414
- "renovate/**"
1515
tags:
16-
- '[0-9][0-9].[0-9]+.[0-9]+(-rc[0-9]+)?'
16+
- '[0-9][0-9].[0-9]+.[0-9]+'
17+
- '[0-9][0-9].[0-9]+.[0-9]+-rc[0-9]+'
1718
pull_request:
1819
merge_group:
1920
schedule:
@@ -345,11 +346,15 @@ jobs:
345346
crate: cargo-edit
346347
bin: cargo-set-version
347348
- name: Update version if PR against main branch
348-
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
349-
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
349+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
350+
env:
351+
PR_NUMBER: ${{ github.event.pull_request.number }}
352+
run: |
353+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
354+
cargo set-version --offline --workspace "$PR_VERSION"
350355
- name: Update version if PR against non-main branch
351356
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
352-
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }}
357+
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
353358
env:
354359
PR_NUMBER: ${{ github.event.pull_request.number }}
355360
run: |
@@ -420,11 +425,15 @@ jobs:
420425
crate: cargo-edit
421426
bin: cargo-set-version
422427
- name: Update version if PR against main branch
423-
if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }}
424-
run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }}
428+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }}
429+
env:
430+
PR_NUMBER: ${{ github.event.pull_request.number }}
431+
run: |
432+
PR_VERSION="0.0.0-pr${PR_NUMBER}"
433+
cargo set-version --offline --workspace "$PR_VERSION"
425434
- name: Update version if PR against non-main branch
426435
# For PRs to be merged against a release branch, use the version that has already been set in the calling script.
427-
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }}
436+
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }}
428437
env:
429438
PR_NUMBER: ${{ github.event.pull_request.number }}
430439
run: |

0 commit comments

Comments
 (0)