Skip to content

Commit 60984e7

Browse files
ci: add concurrency group to functions.yaml to cancel redundant runs (#3536)
* ci: add concurrency group to functions.yaml to cancel redundant runs Without a concurrency configuration, pushing multiple commits to the same PR triggers multiple simultaneous workflow runs. Add a concurrency group keyed on workflow name and ref so that only the latest run for a given branch or PR is active, cancelling any in-progress predecessor. Fixes #3531 * ci: only cancel in-progress runs for PRs, not main pushes Pushes to main trigger build and publish jobs. Cancelling an in-progress main run when another push arrives could interrupt image publishing. Make cancel-in-progress conditional on pull_request events only.
1 parent 56465d4 commit 60984e7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/functions.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
branches:
1717
- main
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
22+
1923
# Global version definitions
2024
env:
2125
PYTHON_VERSION: "3.10"

0 commit comments

Comments
 (0)