-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: secret scanning remove fetch depth (#132)
- Loading branch information
Showing
1 changed file
with
0 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,30 +10,12 @@ jobs: | |
contents: "read" | ||
|
||
outputs: | ||
branch: ${{ steps.fetch_depth.outputs.branch }} | ||
depth: ${{ steps.fetch_depth.outputs.depth }} | ||
latest_release: ${{ steps.trufflehog_release.outputs.latest_release }} | ||
latest_tag_name: ${{ steps.trufflehog_release.outputs.latest_tag_name }} | ||
|
||
steps: | ||
- name: Set fetch depth | ||
id: fetch_depth | ||
shell: bash | ||
run: | | ||
if [ "${{ github.event_name }}" == "push" ]; then | ||
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> "$GITHUB_OUTPUT" | ||
echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | ||
fi | ||
if [ "${{ github.event_name }}" == "pull_request" ]; then | ||
echo "depth=$((${{ github.event.pull_request.commits }}+2))" >> "$GITHUB_OUTPUT" | ||
echo "branch=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.fetch_depth.outputs.branch }} | ||
fetch-depth: ${{ steps.fetch_depth.outputs.depth }} | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|