fix(ci): gitleaks через бинарник на $GITHUB_WORKSPACE (Gitea runner) (#10)
Release Please / Release Please (push) Skipped
Release / GoReleaser (push) Skipped
Tests / Secret scan (gitleaks) (push) Skipped
Tests / Test (Go 1.25) (push) Skipped
Tests / Test (Go stable) (push) Skipped
Tests / Secret scan (gitleaks) (pull_request) Successful in 5s
Tests / Test (Go stable) (pull_request) Successful in 21s
Tests / Test (Go 1.25) (pull_request) Successful in 30s

This commit is contained in:
2026-08-29 16:14:00 +01:00
parent 69844c9122
commit 5a0b2ab412
+16 -5
View File
@@ -35,14 +35,25 @@ jobs:
echo "RANGE=$RANGE" >> "$GITHUB_ENV" echo "RANGE=$RANGE" >> "$GITHUB_ENV"
echo "Scanning range: $RANGE" echo "Scanning range: $RANGE"
# docker:// actions mount the workspace at /github/workspace — not the # Install the gitleaks binary instead of a docker action: the
# host path from ${{ github.workspace }} (that path does not exist in-container). # docker://zricethezav/gitleaks action hardcodes /github/workspace,
# which does not exist on the Gitea (act) runner. $GITHUB_WORKSPACE is
# the checkout dir on BOTH runners (GitHub and Gitea act). Mirrors the
# fix applied to 2dph (issue #142).
- name: Gitleaks (diff-only, fail on leak) - name: Gitleaks (diff-only, fail on leak)
uses: docker://zricethezav/gitleaks:latest
env: env:
GITLEAKS_RANGE: ${{ env.RANGE }} GITLEAKS_RANGE: ${{ env.RANGE }}
with: run: |
args: detect --source /github/workspace --log-opts="$GITLEAKS_RANGE" --redact --verbose set -euo pipefail
curl -fsSLo /tmp/gitleaks.tar.gz \
https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks
chmod +x /tmp/gitleaks
/tmp/gitleaks detect \
--source "$GITHUB_WORKSPACE" \
--log-opts="$GITLEAKS_RANGE" \
--redact \
--verbose
test: test:
name: Test (Go ${{ matrix.go }}) name: Test (Go ${{ matrix.go }})