Skip to content

Commit 1c44e85

Browse files
committed
fix: run ensure-gitleaks.sh if cache restoration fails
1 parent ef229b2 commit 1c44e85

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ runs:
8989

9090
- name: Set executable bit on cached binary
9191
if: steps.cache_gitleaks.outputs.cache-hit == 'true'
92+
id: set-executable-bit
93+
# with wsl even if cache is restored we might not have the executable restored
94+
continue-on-error: true
9295
run: |
9396
set -euo pipefail
9497
prefix=~/.local/bin
@@ -97,7 +100,7 @@ runs:
97100
shell: bash
98101

99102
- name: Ensure gitleaks
100-
if: steps.cache_gitleaks.outputs.cache-hit != 'true'
103+
if: steps.cache_gitleaks.outputs.cache-hit != 'true' || steps.set-executable-bit.outcome != 'success'
101104
# && runner.os == 'Linux'
102105
id: gitleaks
103106
shell: bash

0 commit comments

Comments
 (0)