From 900813fc207129893ac673740013f3c59b7433e8 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 22 Feb 2026 07:07:12 +0100 Subject: [PATCH] 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 --- .gitea/workflows/ci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3f5b0f4..36d9e9c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,7 +12,11 @@ jobs: container: image: python:3.12-alpine 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 run: pip install --no-cache-dir -q ruff - name: Lint @@ -24,7 +28,11 @@ jobs: container: image: python:3.12-alpine 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 run: | pip install --no-cache-dir -q -r requirements.txt @@ -38,9 +46,10 @@ jobs: image: ghcr.io/gitleaks/gitleaks:latest options: --entrypoint "" steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - name: Checkout + run: | + git clone --branch "${GITHUB_REF_NAME}" \ + "https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . - name: Scan for secrets run: gitleaks detect --source . -v