Skip to content

Commit 658a8e8

Browse files
[CONFIG] Debug part 9 of many for #177 🙈
1 parent a755fea commit 658a8e8

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/CI-BUILD.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,12 @@ jobs:
151151
shell: bash
152152

153153
BUILD_STATUS:
154+
permissions:
155+
actions: read
156+
pull-requests: read
154157
needs: [BUILD, BOOTSTRAP]
155158
runs-on: ubuntu-latest
156-
if: always()
159+
if: ${{ !cancelled() }}
157160
outputs:
158161
didBUILD: ${{ steps.check_status.outputs.build_success }}
159162
steps:

.github/workflows/CI-MATs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ permissions: {}
1919

2020
jobs:
2121
check_build:
22+
permissions:
23+
actions: read
24+
pull-requests: read
2225
runs-on: ubuntu-latest
2326
outputs:
2427
should_run: ${{ steps.check.outputs.should_run }}
@@ -41,8 +44,12 @@ jobs:
4144
fi
4245
4346
MATS:
47+
permissions:
48+
actions: read
49+
contents: read
50+
statuses: write
4451
needs: check_build
45-
if: ${{ needs.check_build.outputs.should_run == 'true' }}
52+
if: ${{ !cancelled() && (needs.check_build.outputs.should_run == 'true') }}
4653
runs-on: ubuntu-latest
4754
environment: ${{ needs.check_build.outputs.build_environment }}
4855
defaults:
@@ -89,7 +96,9 @@ jobs:
8996
if: ${{ always() }}
9097

9198
MATS_STATUS:
92-
needs: [MATS, check_build]
99+
permissions:
100+
actions: read
101+
needs: [check_build, MATS]
93102
runs-on: ubuntu-latest
94103
if: ${{ !cancelled() }}
95104
outputs:

.github/workflows/Tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ permissions: {}
2828

2929
jobs:
3030
check_mats:
31+
permissions:
32+
actions: read
33+
pull-requests: read
3134
runs-on: ubuntu-latest
3235
outputs:
3336
should_run: ${{ steps.check.outputs.should_run }}
@@ -37,8 +40,8 @@ jobs:
3740
run: |
3841
if [[ "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
3942
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')
4245
if [[ "$PASSED_MATS" == "true" ]]; then
4346
echo "should_run=true" >> $GITHUB_OUTPUT
4447
else
@@ -66,7 +69,7 @@ jobs:
6669
pull-requests: read
6770
security-events: none
6871
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') }}
7073
needs: [check_mats]
7174
runs-on: ${{ matrix.os }}
7275
timeout-minutes: 10

0 commit comments

Comments
 (0)