File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,12 @@ jobs:
151
151
shell : bash
152
152
153
153
BUILD_STATUS :
154
+ permissions :
155
+ actions : read
156
+ pull-requests : read
154
157
needs : [BUILD, BOOTSTRAP]
155
158
runs-on : ubuntu-latest
156
- if : always()
159
+ if : ${{ !cancelled() }}
157
160
outputs :
158
161
didBUILD : ${{ steps.check_status.outputs.build_success }}
159
162
steps :
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ permissions: {}
19
19
20
20
jobs :
21
21
check_build :
22
+ permissions :
23
+ actions : read
24
+ pull-requests : read
22
25
runs-on : ubuntu-latest
23
26
outputs :
24
27
should_run : ${{ steps.check.outputs.should_run }}
41
44
fi
42
45
43
46
MATS :
47
+ permissions :
48
+ actions : read
49
+ contents : read
50
+ statuses : write
44
51
needs : check_build
45
- if : ${{ needs.check_build.outputs.should_run == 'true' }}
52
+ if : ${{ !cancelled() && ( needs.check_build.outputs.should_run == 'true') }}
46
53
runs-on : ubuntu-latest
47
54
environment : ${{ needs.check_build.outputs.build_environment }}
48
55
defaults :
89
96
if : ${{ always() }}
90
97
91
98
MATS_STATUS :
92
- needs : [MATS, check_build]
99
+ permissions :
100
+ actions : read
101
+ needs : [check_build, MATS]
93
102
runs-on : ubuntu-latest
94
103
if : ${{ !cancelled() }}
95
104
outputs :
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ permissions: {}
28
28
29
29
jobs :
30
30
check_mats :
31
+ permissions :
32
+ actions : read
33
+ pull-requests : read
31
34
runs-on : ubuntu-latest
32
35
outputs :
33
36
should_run : ${{ steps.check.outputs.should_run }}
37
40
run : |
38
41
if [[ "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
39
42
ARTIFACTS_URL="${{ github.event.workflow_run.artifacts_url }}"
40
- PASSED_MATS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$ARTIFACTS_URL" | \
41
- jq -r '.artifacts[] | select(.name=="mats-status ") | .passedMATs')
43
+ PASSED_MATS=$(gh api " ${{ github.event.workflow_run.artifacts_url }}" \
44
+ -- jq '.artifacts[] | select(.name=="MATS_STATUS ") | .passedMATs')
42
45
if [[ "$PASSED_MATS" == "true" ]]; then
43
46
echo "should_run=true" >> $GITHUB_OUTPUT
44
47
else
66
69
pull-requests : read
67
70
security-events : none
68
71
environment : ${{ needs.check_mats.outputs.mats_environment }}
69
- if : ${{ success () && (needs.check_mats.outputs.should_run == 'true') }}
72
+ if : ${{ !cancelled () && (needs.check_mats.outputs.should_run == 'true') }}
70
73
needs : [check_mats]
71
74
runs-on : ${{ matrix.os }}
72
75
timeout-minutes : 10
You can’t perform that action at this time.
0 commit comments