From 9807e7ec97900c7430deb6ddb947bf4b18c1a4cd Mon Sep 17 00:00:00 2001 From: rock Date: Sat, 5 Sep 2026 22:40:27 -0700 Subject: [PATCH] ci: fix workflow - use docker:27-dind container with git built-in Previous run failed because: - rust:1.83-bookworm container lacks Node.js (needed for actions/checkout) - Docker not available in the rust container - actions/checkout@v4 is a third-party action that needs Node Solution: - Use docker:27-dind container (has docker + git preinstalled) - Replace actions/checkout with direct git clone + checkout - All steps run directly in the docker container This matches Forgejo's native environment better than trying to run GitHub Actions inside a Rust container. --- .gitea/workflows/build.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 59fcae5..5280dc3 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,17 +8,22 @@ on: jobs: build-and-push: name: Build and Push Image - # Use 'rust' runner (not 'docker') - # Available runners in Forgejo: golang, rust, node - # rust runner provides: Rust 1.83-bookworm + Docker-in-Docker for image builds runs-on: rust + container: + image: docker:27-dind + options: --privileged steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + apk add --no-cache git + git clone https://git.riotpiao.com:2222/rock/poimen-memory.git /workspace + cd /workspace + git checkout ${{ github.sha }} - name: Get commit info id: info run: | + cd /workspace SHORT_SHA=$(git rev-parse --short HEAD) COMMIT_MSG=$(git log -1 --pretty=%B | head -1) echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT @@ -32,6 +37,7 @@ jobs: - name: Build image run: | + cd /workspace docker build \ --tag forgejo.riotpiao.com/rock/poimen-memory:${{ steps.info.outputs.short_sha }} \ --tag forgejo.riotpiao.com/rock/poimen-memory:latest \