Skip to content

Commit bfa5007

Browse files
check if workflows directory exists
1 parent 0db637a commit bfa5007

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/octoguard.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
with:
3535
script: |
3636
const fs = require('fs');
37+
const path = '.github/workflows';
38+
if (!fs.existsSync(path)){
39+
core.warning("No workflow directory found, skipping zizmor scan.");
40+
return;
41+
}
3742
3843
const workflows = fs.readdirSync('.github/workflows').filter(file => file.endsWith('.yml') || file.endsWith('.yaml'));
3944
if (workflows.length > 0) {

0 commit comments

Comments
 (0)