diff --git a/docker-compose.yml b/docker-compose.yml index 7dc9d56..9a7c8b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -297,7 +297,10 @@ services: GITEA_INSTANCE_URL: https://${GIT_HOST:-git.example.com}/ GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_TOKEN:-} # set by ./registerGiteaRunner.sh GITEA_RUNNER_NAME: vanguard-runner - GITEA_RUNNER_LABELS: "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest,ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04,dotnet:docker://mcr.microsoft.com/dotnet/sdk:10.0,python:docker://python:3.12" + # JavaScript actions (checkout, upload-artifact) need node INSIDE the job image, so a label used with + # them must point at an image that has it. "python" is bare CPython for plain run: steps; "python312" + # adds node and is what the Discord bot's CI uses, so its wheels match the python:3.12-slim runtime. + GITEA_RUNNER_LABELS: "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest,ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04,dotnet:docker://mcr.microsoft.com/dotnet/sdk:10.0,python:docker://python:3.12,python312:docker://nikolaik/python-nodejs:python3.12-nodejs22" volumes: - /srv/appdata/act_runner:/data - /var/run/docker.sock:/var/run/docker.sock # jobs run as sibling containers; root-equivalent on the host diff --git a/registerGiteaRunner.sh b/registerGiteaRunner.sh index 9e90391..24639cc 100755 --- a/registerGiteaRunner.sh +++ b/registerGiteaRunner.sh @@ -11,3 +11,5 @@ sudo rm -rf /srv/appdata/act_runner/.runner 2>/dev/null || true # forget any docker compose up -d --force-recreate act_runner sleep 6; docker logs act_runner --tail 8 2>&1 | sed 's/^/ /' echo "check: Gitea -> Site Administration -> Actions -> Runners (should list 'vanguard-runner' as idle)" +echo "labels: $(grep -o 'GITEA_RUNNER_LABELS: \".*\"' docker-compose.yml | sed 's/.*\"\(.*\)\"/\1/' | tr ',' '\n' | cut -d: -f1 | tr '\n' ' ')" +echo " (labels are fixed at registration — re-run this script after changing GITEA_RUNNER_LABELS)"