diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f67bc74..a2b9ca41 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: - trying - "renovate/**" tags: - - '[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,7 +345,8 @@ jobs: crate: cargo-edit bin: cargo-set-version - name: Update version if PR - if: ${{ github.event_name == 'pull_request' }} + # For PRs to be merged against a release branch, the version has already been set, in which case ignore this step. + 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 }} # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the @@ -411,7 +412,8 @@ jobs: crate: cargo-edit bin: cargo-set-version - name: Update version if PR - if: ${{ github.event_name == 'pull_request' }} + # For PRs to be merged against a release branch, the version has already been set, in which case ignore this step. + 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 }} - name: Build manifest list run: |