From 02df78a9ecf32ca6233efec9c4baf20db4cc761d Mon Sep 17 00:00:00 2001 From: jankatins Date: Mon, 8 Sep 2025 21:27:43 +0000 Subject: [PATCH] fix: Allow the runner to keep it's labels (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I had the case that an already registered runner was losing it's labels due to a race condition (I think): the compose file was restarted, the runner came up but 10 seconds later, the labels were reset: >If the command is run without --labels, they will be reset, and the runner won’t set them back until it is restarted. The --keep-labels option can be used to preserve the existing labels. I always started all services in the compose file at once, so I never got the idea to restart the runner alone and the runner logs actually always said that the labels where there: > ... with labels: [docker-cli node-bookworm], declared successfully Signed-off-by: jankatins - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/965): fix: Allow the runner to keep it's labels Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/965 Reviewed-by: earl-warren Co-authored-by: jankatins Co-committed-by: jankatins --- examples/docker-compose/compose-forgejo-and-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/docker-compose/compose-forgejo-and-runner.yml b/examples/docker-compose/compose-forgejo-and-runner.yml index a0a90c77..c71cbc4e 100644 --- a/examples/docker-compose/compose-forgejo-and-runner.yml +++ b/examples/docker-compose/compose-forgejo-and-runner.yml @@ -35,7 +35,7 @@ services: bash -c ' /usr/bin/s6-svscan /etc/s6 & sleep 10 ; - su -c "forgejo forgejo-cli actions register --secret {SHARED_SECRET}" git ; + su -c "forgejo forgejo-cli actions register --keep-labels --secret {SHARED_SECRET}" git ; su -c "forgejo admin user create --admin --username root --password {ROOT_PASSWORD} --email root@example.com" git ; sleep infinity '