From 0232fe12552102eb6c4bb012078e44ba548b16e6 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 27 Jan 2025 12:02:45 +0100 Subject: [PATCH] fix: forgejo-runner-service.sh config.yml must point to the cache It is not the default $HOME/.cache/actcache and must be set in config.yml otherwise it won't be used. --- .forgejo/workflows/example-lxc-systemd.yml | 4 ++++ examples/lxc-systemd/forgejo-runner-service.sh | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.forgejo/workflows/example-lxc-systemd.yml b/.forgejo/workflows/example-lxc-systemd.yml index c0c5a9e5..d1d33272 100644 --- a/.forgejo/workflows/example-lxc-systemd.yml +++ b/.forgejo/workflows/example-lxc-systemd.yml @@ -82,6 +82,10 @@ jobs: service=/etc/systemd/system/forgejo-runner@.service cat $service + cache=/var/lib/forgejo-runner/runner-$INPUTS_SERIAL-lxc/.cache/actcache + touch $cache/something + lxc-attach runner-$INPUTS_SERIAL-lxc -- test -f $cache/something + - name: forgejo-runner-service.sh start / stop run: | set -x diff --git a/examples/lxc-systemd/forgejo-runner-service.sh b/examples/lxc-systemd/forgejo-runner-service.sh index 224ffbd7..8bdc73df 100755 --- a/examples/lxc-systemd/forgejo-runner-service.sh +++ b/examples/lxc-systemd/forgejo-runner-service.sh @@ -207,6 +207,11 @@ function ensure_configuration_and_registration() { .runner.labels = ["docker:docker://data.forgejo.org/oci/node:${NODEJS_VERSION}-${DEBIAN_RELEASE}","lxc:lxc://debian:${DEBIAN_RELEASE}"] EOF yq --inplace --from-file $TMPDIR/edit-config $etc/config.yml + cat >$TMPDIR/edit-config <