diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml index fcd6f38..cc71f95 100644 --- a/.github/workflows/secret-scan.yml +++ b/.github/workflows/secret-scan.yml @@ -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