Skip to content

Commit 350bd5b

Browse files
committed
GH actions
1 parent 431a6af commit 350bd5b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/secret-scanning.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020

21+
- name: Set base and head
22+
id: set_vars
23+
run: |
24+
if [ "${{ github.event_name }}" = "pull_request" ]; then
25+
echo "base=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
26+
echo "head=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
27+
else
28+
echo "base=${{ github.event.before }}" >> $GITHUB_OUTPUT
29+
echo "head=${{ github.event.after }}" >> $GITHUB_OUTPUT
30+
fi
31+
2132
- name: TruffleHog OSS
2233
uses: trufflesecurity/trufflehog@main
2334
with:
2435
path: ./
25-
base: ${{ github.event.repository.default_branch }}
26-
head: HEAD
36+
base: ${{ steps.set_vars.outputs.base }}
37+
head: ${{ steps.set_vars.outputs.head }}
2738
extra_args: --debug --only-verified

0 commit comments

Comments
 (0)