1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-06-27 16:35:58 +00:00

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.
This commit is contained in:
Earl Warren 2025-01-27 12:02:45 +01:00
parent 253eb51687
commit 0232fe1255
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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 <<EOF
.cache.dir = "/var/lib/forgejo-runner/runner-${INPUTS_SERIAL}-lxc/.cache/actcache"
EOF
yq --inplace --from-file $TMPDIR/edit-config $etc/config.yml
fi
if ! test -f $etc/env; then