Skip to content

Commit 6520d79

Browse files
authored
Merge pull request #31 from PostHog/tom/semgrep-skip
fix: skip semgrep if .github dir doesn't exist
2 parents ee8f1b3 + 5462169 commit 6520d79

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v6
2323

24+
- name: Check for .github directory
25+
id: check
26+
run: |
27+
if [ -d ".github/" ]; then
28+
echo "exists=true" >> "$GITHUB_OUTPUT"
29+
fi
30+
2431
- name: Run Semgrep
32+
if: steps.check.outputs.exists == 'true'
2533
run: |
2634
semgrep \
2735
--config ".semgrep/rules/" \

0 commit comments

Comments
 (0)