ci: Skip release jobs on outdated tags
This happens a commit is pushed to main while the pipelines have not finished for the previous commit. In this case the devel-tag pipelines will run concurrently, leading to unpredictable results for the devel release.
This commit is contained in:
@@ -10,8 +10,9 @@ on:
|
|||||||
- v*
|
- v*
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Terminate all previous runs of the same workflow for pull requests
|
# Terminate all previous runs of the same workflow for the same tag, but never
|
||||||
group: ci-${{ github.head_ref || github.run_id }}
|
# cancel for the main / release branch pipelines.
|
||||||
|
group: ci-${{ (github.ref_type == 'tag' && github.ref) || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -103,6 +104,10 @@ jobs:
|
|||||||
|
|
||||||
tag:
|
tag:
|
||||||
name: Release / Tag
|
name: Release / Tag
|
||||||
|
concurrency:
|
||||||
|
# Never tag outdated commits on the main branch by skipping superseded commits
|
||||||
|
group: ci-tag-${{ (github.ref == 'refs/heads/main' && github.ref) || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
if: |
|
if: |
|
||||||
startsWith(github.ref, 'refs/heads/') &&
|
startsWith(github.ref, 'refs/heads/') &&
|
||||||
needs.docs.result == 'success' &&
|
needs.docs.result == 'success' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user