fix: replace actions/checkout with git clone in container jobs
The alpine and gitleaks container images lack Node.js, which actions/checkout@v4 requires. Use manual git clone instead. Build job stays on host where actions/checkout works natively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
-5
@@ -12,7 +12,11 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
apk add --no-cache -q git
|
||||||
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
|
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
||||||
- name: Install ruff
|
- name: Install ruff
|
||||||
run: pip install --no-cache-dir -q ruff
|
run: pip install --no-cache-dir -q ruff
|
||||||
- name: Lint
|
- name: Lint
|
||||||
@@ -24,7 +28,11 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
apk add --no-cache -q git
|
||||||
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
||||||
|
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
pip install --no-cache-dir -q -r requirements.txt
|
pip install --no-cache-dir -q -r requirements.txt
|
||||||
@@ -38,9 +46,10 @@ 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
|
git clone --branch "${GITHUB_REF_NAME}" \
|
||||||
|
"https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" .
|
||||||
- name: Scan for secrets
|
- name: Scan for secrets
|
||||||
run: gitleaks detect --source . -v
|
run: gitleaks detect --source . -v
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user