Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
with:
version: "latest"
ignore-nothing-to-cache: true
enable-cache: true

- uses: actions/cache@v4
if: ${{ runner.os != 'Windows' }}
Expand Down
15 changes: 5 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ runs:
/usr/local/bin/gitleaks
/opt/homebrew/bin/gitleaks
~/.local/bin/gitleaks
key: gitleaks-${{ runner.os }}-${{ runner.arch }}-${{ steps.gitleaks.outputs.version }}

key: gitleaks-${{ runner.os }}-${{ runner.arch }}

- name: Set executable bit on cached binary
if: steps.cache_gitleaks.outputs.cache-hit == 'true'
id: set-executable-bit
# with wsl even if cache is restored we might not have the executable restored
continue-on-error: true
run: |
set -euo pipefail
prefix=~/.local/bin
Expand All @@ -97,7 +99,7 @@ runs:
shell: bash

- name: Ensure gitleaks
if: steps.cache_gitleaks.outputs.cache-hit != 'true'
if: steps.cache_gitleaks.outputs.cache-hit != 'true' || steps.set-executable-bit.outcome != 'success'
# && runner.os == 'Linux'
id: gitleaks
shell: bash
Expand All @@ -106,13 +108,6 @@ runs:
DEBUG: ${{ runner.debug == '1' }}
GH_TOKEN: ${{ github.token }}

# - name: Install gitleaks (windows)
# if: steps.cache_gitleaks.outputs.cache-hit != 'true' && runner.os == 'Windows'
# run: |
# choco install gitleaks -y
# gitleaks --version
# shell: cmd

- name: Run gitleaks
# gitleaks does not support multiple paths https://github.com/gitleaks/gitleaks/issues/1888
run: ${GITHUB_ACTION_PATH}/scripts/run-gitleaks.sh
Expand Down
Loading