The rust runner pod is pre-configured with:
- Rust 1.83-bookworm base image
- Docker CLI + Node.js (for GitHub Actions)
- Git + all build tools
- TLS-secured docker daemon connection at tcp://localhost:2376
Don't override with a container image. Use the runner's native environment.
This is the correct pattern for self-hosted runners.
Previous issue: git repo check at /workspace/rock failed
Solution:
- Clone repo explicitly into /src directory
- cd /src for all git operations
- Build from /src
- Use github.sha environment variable for explicit checkout
Previous failure: git clone tried to clone into /workspace which already exists
Fix:
- Remove git clone step
- Forgejo automatically checks out repo into current directory
- Just install git, get commit info, build, and push
- Much simpler and cleaner
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.
The .gitea/ workflows were outdated and caused conflicts:
- Used runs-on: rust, golang (non-existent runners)
- Complex docker:27-cli setup with TLS (fragile)
- Different secret variable names (FORGEJO_REGISTRY_TOKEN vs REGISTRY_PAT)
- No tests before build
.forgejo/workflows/build.yaml is the clean, working version:
- Simplified docker commands
- Proper runner: docker
- Tests run first
- Cleanup on failure
- No hanging processes