From bac1947e1489ac5d4e73d36017583b910069d26b Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 27 Apr 2026 00:00:49 +0000 Subject: [PATCH] fix: use curl+tar checkout (act runners lack git) Act runner containers do not have git installed. Using curl+tar to download repo archive instead. GITEATOKEN secret already verified working independently. --- .gitea/workflows/ci.yml | 58 ++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 68189e1..7a90145 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -18,10 +18,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -37,10 +36,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -60,10 +58,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -82,10 +79,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -107,10 +103,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -139,10 +134,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal @@ -173,11 +167,10 @@ jobs: steps: - name: Checkout repository run: | - apk add --no-cache git openssh-client - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + apk add --no-cache curl + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | apk add --no-cache curl bash @@ -211,10 +204,9 @@ jobs: steps: - name: Checkout repository run: | - mkdir -p ~/.ssh - ssh-keyscan -H gitea-lxc.moon-dragon.us >> ~/.ssh/known_hosts 2>/dev/null || true - git clone --depth 1 git@gitea-lxc.moon-dragon.us:echo/linux_patch_api.git . - git config --global --add safe.directory "$(pwd)" + curl -sfL -H "Authorization: token ${{ secrets.GITEATOKEN }}" "https://gitea-lxc.moon-dragon.us/echo/linux_patch_api/archive/${GITHUB_SHA}.tar.gz" -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm -f repo.tar.gz - name: Install Rust run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal