mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-24 23:08:57 +06:00
feat(ci): set fetch-depth: 0
in trufflehog checkout step (#31663)
This commit is contained in:
parent
20528f067c
commit
084b5094eb
23
.github/workflows/trufflehog.yml
vendored
23
.github/workflows/trufflehog.yml
vendored
@ -10,20 +10,9 @@ jobs:
|
|||||||
trufflehog:
|
trufflehog:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- name: Checkout code
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
if [ "${{ github.event_name }}" == "push" ]; then
|
with:
|
||||||
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
|
fetch-depth: 0
|
||||||
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
|
- name: Secret Scanning
|
||||||
fi
|
uses: trufflesecurity/trufflehog@main
|
||||||
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}}
|
|
||||||
- name: Secret Scanning
|
|
||||||
uses: trufflesecurity/trufflehog@main
|
|
||||||
|
Loading…
Reference in New Issue
Block a user