Skip to content

Commit c054534

Browse files
authored
Merge pull request docker#4 from crazy-max/better-error
zizmor: better error handling in checks step
2 parents 0e0148c + 6f1c20c commit c054534

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/octoguard.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: octoguard
22

3-
concurrency:
4-
group: ${{ github.workflow }}-${{ github.ref }}
5-
cancel-in-progress: true
6-
73
on:
84
workflow_call:
95
workflow_dispatch:

.github/workflows/zizmor.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ jobs:
4141
return;
4242
}
4343
44-
await github.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {
45-
...context.repo,
46-
}).catch(error => {
47-
if (error.status === 403) {
48-
throw new Error('Advanced Security needs to be enabled on this repository.');
49-
}
50-
});
51-
core.info('Advanced Security is enabled on this repository.');
44+
try {
45+
await github.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {
46+
...context.repo,
47+
}).catch(err => {
48+
if (err.status === 403) {
49+
throw new Error('Advanced Security needs to be enabled on this repository.');
50+
}
51+
});
52+
core.info('Advanced Security is enabled on this repository.');
53+
} catch (err) {
54+
core.setFailed(err.message);
55+
}
5256
-
5357
name: Setup uv
5458
if: ${{ env.HAS_WORKFLOWS }}

0 commit comments

Comments
 (0)