fix: replace actions/checkout with git clone in container jobs
Some checks failed
CI / gitleaks (push) Failing after 4s
CI / lint (push) Successful in 25s
CI / test (3.11) (push) Failing after 32s
CI / test (3.13) (push) Failing after 35s
CI / test (3.12) (push) Failing after 39s
CI / build (push) Has been skipped

actions/checkout@v4 requires node, which isn't available in
alpine or gitleaks images. Use plain git clone instead for
containerized jobs; keep actions/checkout for the host build job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-22 06:23:49 +01:00
parent 82f5984631
commit de2d1fdf15

View File

@@ -5,6 +5,9 @@ on:
pull_request:
branches: [master]
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
jobs:
gitleaks:
runs-on: linux
@@ -12,9 +15,11 @@ jobs:
image: ghcr.io/gitleaks/gitleaks:latest
options: --entrypoint ""
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout
run: |
apk add --no-cache git
git clone --depth=0 "$REPO_URL" .
git checkout "${{ github.sha }}"
- name: Scan for secrets
run: gitleaks detect --source . --verbose
@@ -23,7 +28,11 @@ jobs:
container:
image: python:3.13-alpine
steps:
- uses: actions/checkout@v4
- name: Checkout
run: |
apk add --no-cache git
git clone --depth=1 "$REPO_URL" .
git checkout "${{ github.sha }}"
- name: Install deps
run: pip install -q -r requirements-dev.txt
- name: Lint
@@ -38,7 +47,11 @@ jobs:
container:
image: python:${{ matrix.python-version }}-alpine
steps:
- uses: actions/checkout@v4
- name: Checkout
run: |
apk add --no-cache git
git clone --depth=1 "$REPO_URL" .
git checkout "${{ github.sha }}"
- name: Install system deps
run: apk add --no-cache opus-dev
- name: Install Python deps