fix: switch CI from rust runner to docker runner with rust:1-bookworm
Build and Push / Test (push) Successful in 2m21s
Build and Push / Build and push image (push) Canceled after 0s

Old 'rust' runner had stale glibc causing linker failures.
Now uses 'docker' runner (same as other repos) with explicit
rust:1-bookworm container image (modern glibc).
Added cargo cache step for faster builds.
This commit is contained in:
2026-08-28 15:46:27 -07:00
parent edccf19072
commit 9dd2a48217
+21 -12
View File
@@ -13,31 +13,40 @@ env:
jobs:
test:
name: Test
runs-on: rust
runs-on: docker
container: rust:1-bookworm
steps:
- name: Clone repo
run: |
git clone --depth 1 --branch ${{ github.ref_name }} \
${{ github.server_url }}/${{ github.repository }}.git .
- name: Install node (required by JS-based actions)
run: apt-get update && apt-get install -y --no-install-recommends nodejs
- uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Run tests
run: cargo test --all
build:
name: Build and push image
runs-on: golang
runs-on: docker
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
container:
image: docker:27-cli
volumes:
- /docker-certs/client:/docker-certs/client:ro
container: docker:27-cli
env:
DOCKER_HOST: tcp://localhost:2376
DOCKER_HOST: tcp://forgejo-runner-dind.cicd.svc.cluster.local:2376
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: /docker-certs/client
steps:
- name: install node (required by JS-based actions)
- name: Install node (required by JS-based actions)
run: apk add --no-cache nodejs git
- uses: actions/checkout@v4