File tree Expand file tree Collapse file tree 3 files changed +17
-27
lines changed Expand file tree Collapse file tree 3 files changed +17
-27
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
+ jobs :
11
+ cancel :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Cancel previous runs
15
+ uses : styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # 0.8.0
16
+ with :
17
+ workflow_id : ${{ github.event.workflow.id }}
Original file line number Diff line number Diff line change 14
14
- cron : ' 0 5 * * 1'
15
15
16
16
jobs :
17
- cancel_ci :
18
- name : Mandatory checks before CI
19
- runs-on : ubuntu-latest
20
- steps :
21
- # TODO: Fix this for PRs
22
- - name : Cancel Previous Runs
23
- uses : styfle/cancel-workflow-action@ce177499ccf9fd2aded3b0426c97e5434c2e8a73
24
- with :
25
- access_token : ${{ secrets.GITHUB_TOKEN }}
26
-
27
- # The rest only run if above are done (unless cron only)
28
-
29
17
tests :
30
18
name : ${{ matrix.name }}
31
19
runs-on : ${{ matrix.os }}
32
- needs : cancel_ci
33
20
strategy :
34
21
fail-fast : true
35
22
matrix :
@@ -113,7 +100,6 @@ jobs:
113
100
egg_info :
114
101
name : egg_info with Python 3.7
115
102
runs-on : ubuntu-latest
116
- needs : cancel_ci
117
103
steps :
118
104
- name : Checkout code
119
105
uses : actions/checkout@v2
Original file line number Diff line number Diff line change 19
19
branches : [ master ]
20
20
21
21
jobs :
22
- cancel_ci :
23
- name : Mandatory checks before CI
24
- runs-on : ubuntu-latest
25
- steps :
26
- # TODO: Fix this for PRs
27
- - name : Cancel Previous Runs
28
- uses : styfle/cancel-workflow-action@ce177499ccf9fd2aded3b0426c97e5434c2e8a73
29
- with :
30
- access_token : ${{ secrets.GITHUB_TOKEN }}
31
-
32
- # The rest only run if above are done
33
-
34
22
analyze :
35
23
name : Analyze
36
24
runs-on : ubuntu-latest
37
- needs : cancel_ci
38
25
39
26
strategy :
40
27
fail-fast : false
You can’t perform that action at this time.
0 commit comments