Skip to content

Commit

Permalink
fix: secret scanning remove fetch depth (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtro authored Jul 8, 2024
1 parent 01c9c63 commit 11fa4e2
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/cosign-installer@v3.5.0
Expand Down

0 comments on commit 11fa4e2

Please sign in to comment.