From 5fc09183cbda3b8f7fe969025ae5aa3f71e80d47 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Wed, 18 Feb 2026 09:33:54 +0100 Subject: [PATCH] fix(ci): replace actions/checkout with git clone The actions/checkout action requires Node.js which is unavailable in the rust:1.89-bookworm container. Use manual git clone with shallow depth for a Node-free checkout. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f87948d..8226543 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,7 +27,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: rustup component add rustfmt - run: cargo fmt --check @@ -37,7 +40,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: rustup component add clippy # Lint both feature sets independently - name: Clippy (server) @@ -51,7 +57,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: cargo install cargo-audit - run: cargo audit @@ -65,7 +74,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - name: Run tests (server) run: cargo test --features server --no-default-features - name: Run tests (web) @@ -83,7 +95,10 @@ jobs: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - name: Determine image tag id: tag