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