Skip to content

Commit 7448144

Browse files
AlanGreenetekton-robot
authored andcommitted
Update concurrency settings for E2E to cancel old PR-triggered runs
Define a concurrency group for the E2E workflow and configure it to cancel in progress runs when a new run is triggered. For PRs this means that only the latest run triggered for a given PR will be completed as any in progress runs will be cancelled. For push events to the `main` branch, a fallback is used (`run_id`) as the `head_ref` is only defined for PR events. This means that we will run the E2E to completion on each push event as expected.
1 parent 401af73 commit 7448144

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
# The branches below must be a subset of the branches above
1212
branches: ["main"]
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
1418
defaults:
1519
run:
1620
shell: bash

0 commit comments

Comments
 (0)