Skip to content

Commit b0305cb

Browse files
authored
Add concurrency cancel and ignore docs/markdown changes across CI workflows (#168)
* Add concurrency cancel and ignore docs/markdown changes across CI workflows * Clarify PR-only concurrency (no push queuing)
1 parent 442a974 commit b0305cb

File tree

7 files changed

+68
-2
lines changed

7 files changed

+68
-2
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@ on:
33
pull_request:
44
branches:
55
- main
6+
paths-ignore:
7+
- "**/*.md"
8+
- "docs/**"
69
push:
710
branches:
811
- main
12+
paths-ignore:
13+
- "**/*.md"
14+
- "docs/**"
15+
16+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
920

1021
permissions:
1122
contents: read

.github/workflows/codeql.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,19 @@ name: "CodeQL"
1414
on:
1515
push:
1616
branches: ["main"]
17+
paths-ignore:
18+
- "**/*.md"
19+
- "docs/**"
1720
pull_request:
1821
branches: ["main"]
22+
paths-ignore:
23+
- "**/*.md"
24+
- "docs/**"
25+
26+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1930

2031
permissions:
2132
contents: read

.github/workflows/golangci-lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ on:
33
pull_request:
44
branches:
55
- main
6+
paths-ignore:
7+
- "**/*.md"
8+
- "docs/**"
9+
10+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
615
permissions:
716
contents: read
817
pull-requests: read

.github/workflows/pmg-e2e.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,22 @@ on:
44
pull_request:
55
branches:
66
- main
7+
paths-ignore:
8+
- "**/*.md"
9+
- "docs/**"
710
push:
811
branches:
912
- main
13+
paths-ignore:
14+
- "**/*.md"
15+
- "docs/**"
1016
workflow_dispatch:
1117

18+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
21+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
22+
1223
permissions:
1324
contents: read
1425

.github/workflows/scorecard.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ on:
1010
# To guarantee Maintained check is occasionally updated. See
1111
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
1212
schedule:
13-
- cron: '35 22 * * 0'
13+
- cron: "35 22 * * 0"
1414
push:
15-
branches: [ "main" ]
15+
branches: ["main"]
16+
paths-ignore:
17+
- "**/*.md"
18+
- "docs/**"
19+
20+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1624

1725
# Declare default permissions as read only.
1826
permissions: read-all

.github/workflows/secret_scan.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
branches:
55
- main
66

7+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
10+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
11+
712
permissions:
813
contents: read
914

.github/workflows/vet-ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@ name: vet OSS Components
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "**/*.md"
7+
- "docs/**"
58
push:
69
branches:
710
- main
11+
paths-ignore:
12+
- "**/*.md"
13+
- "docs/**"
14+
15+
# PRs share a concurrency group (cancel/serialize); Pushes use unique groups to avoid cancellation/queuing
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.ref) || github.run_id }}
18+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
819

920
permissions:
1021
contents: read

0 commit comments

Comments
 (0)