From 96d704f192bc4d94f2441a9974feedaddf10b947 Mon Sep 17 00:00:00 2001 From: TapTap Date: Fri, 13 Nov 2026 15:58:11 +0000 Subject: [PATCH] ci: check out the image job with plain git Kaniko unpacks the final stage over /, so tools from the CI image (node in particular) are gone after the build. The checkout action's post step then fails with exit code 127 even though the image was pushed successfully. Use a plain git fetch/checkout in the image job, which has no JavaScript action and therefore no post step. --- .gitea/workflows/ci.yaml | 11 ++++++++++- README.md | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 6d9175a..88c4e47 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -58,7 +58,16 @@ jobs: # keep the Docker credential store there for the whole job. DOCKER_CONFIG: /kaniko/.docker steps: - - uses: actions/checkout@v4 + # No JavaScript actions in this job: kaniko unpacks the final stage's + # root filesystem over /, which removes the tools those actions need for + # their post steps (for example node from the CI image). + - name: Check out the source + run: | + set -euo pipefail + git init -q . + git remote add origin "$GITHUB_SERVER_URL/TapTap/AudioManager.git" + git fetch -q --depth=1 origin "$GITHUB_REF" + git checkout -q FETCH_HEAD - name: Log in to the registry run: | mkdir -p "$DOCKER_CONFIG" diff --git a/README.md b/README.md index 91c4201..a102f60 100644 --- a/README.md +++ b/README.md @@ -636,7 +636,9 @@ The CI image job uses kaniko and keeps `DOCKER_CONFIG=/kaniko/.docker` for the whole job. A multi-stage build replaces `/` with the last stage's root filesystem, which deletes `$HOME/.docker/config.json`; without this setting kaniko would push anonymously and Gitea would reject it with -`401 reqPackageAccess`. +`401 reqPackageAccess`. For the same reason the image job checks out the source +with plain `git` instead of a JavaScript action, whose post step would lose its +Node runtime after the build. To build and push manually (or to deploy from a workstation):