Skip to content

Commit 20f69be

Browse files
authored
Don't cancel builds on main branch (#109)
* Don't cancel builds on main branch Upstream aspect-build/rules_jasmine#129 * Update ci.yaml
1 parent ae1f6e0 commit 20f69be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ on:
1111
workflow_dispatch:
1212

1313
concurrency:
14-
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109
15-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16-
cancel-in-progress: true
14+
# Cancel previous actions from the same PR or branch except 'main' branch.
15+
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info.
16+
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}}
17+
cancel-in-progress: ${{ github.ref_name != 'main' }}
1718

1819
jobs:
1920
test:

0 commit comments

Comments
 (0)