File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Cancel duplicate workflows
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows : ["CI", "CodeQL"]
6
+ types :
7
+ - requested
8
+
9
+ # Note: This has to be in workflow_run so it works for PRs from forks.
10
+ permissions :
11
+ contents : read
12
+
13
+ jobs :
14
+ cancel :
15
+ permissions :
16
+ actions : write # for styfle/cancel-workflow-action to cancel/stop running workflows
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : Cancel previous runs
20
+ uses : styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # 0.8.0
21
+ with :
22
+ workflow_id : ${{ github.event.workflow.id }}
Original file line number Diff line number Diff line change 9
9
# run every Monday at 5am UTC
10
10
- cron : ' 0 5 * * 1'
11
11
12
+ permissions :
13
+ contents : read
14
+
12
15
jobs :
13
16
tests :
14
17
name : ${{ matrix.name }}
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ concurrency:
18
18
group : ${{ github.workflow }}-${{ github.ref }}
19
19
cancel-in-progress : true
20
20
21
+ permissions :
22
+ contents : read
23
+
21
24
jobs :
22
25
tests :
23
26
name : ${{ matrix.name }}
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ concurrency:
18
18
group : ${{ github.workflow }}-${{ github.ref }}
19
19
cancel-in-progress : true
20
20
21
+ permissions :
22
+ contents : read
21
23
22
24
jobs :
23
25
tests :
Original file line number Diff line number Diff line change @@ -11,8 +11,15 @@ concurrency:
11
11
group : ${{ github.workflow }}-${{ github.ref }}
12
12
cancel-in-progress : true
13
13
14
+ permissions :
15
+ contents : read
16
+
14
17
jobs :
15
18
analyze :
19
+ permissions :
20
+ actions : read # for github/codeql-action/init to get workflow details
21
+ contents : read # for actions/checkout to fetch code
22
+ security-events : write # for github/codeql-action/autobuild to send a status report
16
23
name : Analyze
17
24
runs-on : ubuntu-latest
18
25
You can’t perform that action at this time.
0 commit comments