fix(ci): pick gitleaks binary by CPU architecture
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Security scan (Snyk) (pull_request) Failing after 1s
PR Check / AI code review (opencode) (pull_request) Successful in 7s
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Security scan (Snyk) (pull_request) Failing after 1s
PR Check / AI code review (opencode) (pull_request) Successful in 7s
The runner is arm64; the hardcoded x64 binary failed with 'Exec format error'. Resolve the arch at runtime (x86_64/aarch64).
This commit is contained in:
1 parent
779cf20f45
commit
88dadd5846
1 file changed
+6
-1
@@ -75,8 +75,13 @@ jobs:
|
||||
|
||||
- name: Install gitleaks
|
||||
run: |
|
||||
case "$(uname -m)" in
|
||||
x86_64) GITLEAKS_ARCH=x64 ;;
|
||||
aarch64) GITLEAKS_ARCH=arm64 ;;
|
||||
*) echo "unsupported arch: $(uname -m)" && exit 1 ;;
|
||||
esac
|
||||
curl -fsSL -o /tmp/gitleaks.tar.gz \
|
||||
https://github.com/gitleaks/gitleaks/releases/download/v8.28.0/gitleaks_8.28.0_linux_x64.tar.gz
|
||||
"https://github.com/gitleaks/gitleaks/releases/download/v8.28.0/gitleaks_8.28.0_linux_${GITLEAKS_ARCH}.tar.gz"
|
||||
tar -xzf /tmp/gitleaks.tar.gz -C /usr/local/bin gitleaks
|
||||
gitleaks version
|
||||
|
||||
|
||||
Reference in new issue
Block a user