From e1af809b766daa5b1db6853fc7fbd204abc1acaa Mon Sep 17 00:00:00 2001 From: Stacky McStackface <95074132+stackable-bot@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:12:46 +0100 Subject: [PATCH] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@8e7969c730c6fb7a040c3df2b68488d2c06073a2 (#146) Reference-to: stackabletech/operator-templating@8e7969c (Fix workflow branch condition) --- .github/workflows/build.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61a50f5..99d2fe2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,8 @@ on: - trying - "renovate/**" tags: - - '[0-9][0-9].[0-9]+.[0-9]+(-rc[0-9]+)?' + - '[0-9][0-9].[0-9]+.[0-9]+' + - '[0-9][0-9].[0-9]+.[0-9]+-rc[0-9]+' pull_request: merge_group: schedule: @@ -345,11 +346,15 @@ jobs: crate: cargo-edit bin: cargo-set-version - name: Update version if PR against main branch - if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} - run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + PR_VERSION="0.0.0-pr${PR_NUMBER}" + cargo set-version --offline --workspace "$PR_VERSION" - 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' && github.ref != 'refs/heads/main' }} + if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }} env: PR_NUMBER: ${{ github.event.pull_request.number }} run: | @@ -420,11 +425,15 @@ jobs: crate: cargo-edit bin: cargo-set-version - name: Update version if PR against main branch - if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} - run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + PR_VERSION="0.0.0-pr${PR_NUMBER}" + cargo set-version --offline --workspace "$PR_VERSION" - 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' && github.ref != 'refs/heads/main' }} + if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-') }} env: PR_NUMBER: ${{ github.event.pull_request.number }} run: |