Skip to content

Commit 305eae6

Browse files
authored
refactor: only running dependabot PR pipelines sequentially
1 parent b2378fc commit 305eae6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/default.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ on:
88
branches:
99
- "main"
1010

11+
# We'd like to run the pipeline for dependabot PRs sequentially, and all other PRs in parallel, but still only one action run for each PR.
1112
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
13+
group: >-
14+
${{
15+
github.actor == 'dependabot[bot]' &&
16+
'dependabot' ||
17+
format('{0}-{1}', github.workflow, github.ref)
18+
}}
19+
cancel-in-progress: >-
20+
${{
21+
github.actor != 'dependabot[bot]' &&
22+
github.ref != 'refs/heads/main'
23+
}}
1424
1525
jobs:
1626
init:

0 commit comments

Comments
 (0)