diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c9d1ce7..b9ebd24 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -19,9 +19,10 @@ permissions: contents: read # A newer push to the same pull request cancels the running run; a push to main or a tag -# never cancels another run. +# never cancels another run. A tag run has its own group, so it never shares one with the +# main run of the same commit. concurrency: - group: build-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + group: build-${{ github.event_name == 'pull_request' && github.ref || (github.ref_type == 'tag' && github.ref || github.sha) }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml index d5e3c3b..3546e2f 100644 --- a/.gitea/workflows/lint.yml +++ b/.gitea/workflows/lint.yml @@ -20,9 +20,10 @@ permissions: contents: read # A newer push to the same pull request makes the running run obsolete. A push to main or a -# tag is never cancelled: each merge commit keeps its own result. +# tag is never cancelled: each merge commit keeps its own result, and a tag run has its own +# group, so it never shares one with the main run of the same commit. concurrency: - group: lint-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + group: lint-${{ github.event_name == 'pull_request' && github.ref || (github.ref_type == 'tag' && github.ref || github.sha) }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: diff --git a/changelogs/fragments/ci-concurrency-main-runs.yml b/changelogs/fragments/ci-concurrency-main-runs.yml index 9c037e5..6fe8632 100644 --- a/changelogs/fragments/ci-concurrency-main-runs.yml +++ b/changelogs/fragments/ci-concurrency-main-runs.yml @@ -1,2 +1,4 @@ trivial: - - A later push to main no longer cancels the Lint and Build runs of an earlier one; pull request runs still cancel their predecessors. + - >- + A later push to main no longer cancels the Lint and Build runs of an earlier one; pull request + runs still cancel their predecessors, and a tag run has its own group.