Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
084b5094
Unverified
Commit
084b5094
authored
Jul 30, 2024
by
Luc Georges
Committed by
GitHub
Jul 30, 2024
Browse files
feat(ci): set `fetch-depth: 0` in trufflehog checkout step (#31663)
parent
20528f06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
.github/workflows/trufflehog.yml
.github/workflows/trufflehog.yml
+6
-17
No files found.
.github/workflows/trufflehog.yml
View file @
084b5094
...
...
@@ -10,20 +10,9 @@ jobs:
trufflehog
:
runs-on
:
ubuntu-latest
steps
:
-
shell
:
bash
run
:
|
if [ "${{ github.event_name }}" == "push" ]; then
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "depth=$((${{ github.event.pull_request.commits }}+2))" >> $GITHUB_ENV
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi
-
name
:
Checkout code
uses
:
actions/checkout@v4
with
:
ref
:
${{env.branch}}
fetch-depth
:
${{env.depth}}
fetch-depth
:
0
-
name
:
Secret Scanning
uses
:
trufflesecurity/trufflehog@main
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment