From fd931b3e37c49c505112c341813eaab8d82e1fe7 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 22 Mar 2025 13:21:24 +0000 Subject: [PATCH] chore: upgrade the lxc-systemd example to v6.3.0 [skip cascade] (#505) Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/505 Reviewed-by: Kwonunn Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- examples/lxc-systemd/README.md | 10 +++++++++- examples/lxc-systemd/forgejo-runner-service.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/lxc-systemd/README.md b/examples/lxc-systemd/README.md index 4c68ffd..eaabff2 100644 --- a/examples/lxc-systemd/README.md +++ b/examples/lxc-systemd/README.md @@ -30,6 +30,14 @@ Upgrade to the version X.Y.Z (e.g 6.2.1): - `forgejo-runner-service.sh upgrade X.Y.Z` +### Using a specific version of the Forgejo runner + +The goal is that a LXC container uses a version of the Forgejo runner +that is different from the default. It needs to be installed and pinned. + +- Install: `INPUTS_RUNNER_VERSION=6.3.0 forgejo-runner-service.sh install_runner` +- Pin the version in `/etc/forgejo-runner/N/env` (e.g. `INPUTS_RUNNER_VERSION=6.3.0`) + ## Description - Each runner is assigned a unique serial number (`$INPUTS_SERIAL`) @@ -63,7 +71,7 @@ The creation of a new runner is driven by the following environment variables: - `INPUTS_SERIAL`: unique number in the range `[10-100]` (check `/etc/forgejo-runner`) - `INPUTS_TOKEN`: a runner registration token obtained from the web UI - `INPUTS_FORGEJO`: the Forgejo instance from which `INPUTS_TOKEN` was obtained (e.g. https://code.forgejo.org) -- `INPUTS_RUNNER_VERSION`: the version of the Forgejo runner as found in https://code.forgejo.org/forgejo/runner/releases (e.g. 6.2.0) +- `INPUTS_RUNNER_VERSION`: the version of the Forgejo runner as found in https://code.forgejo.org/forgejo/runner/releases (e.g. 6.3.0) - `INPUTS_LXC_CONFIG`: the value of the `--config` argument of [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/#usage) used when creating the LXC container for the runner (e.g. `docker`) - `INPUTS_LIFETIME`: the LXC container is re-created when its lifetime expires (e.g. 7d) diff --git a/examples/lxc-systemd/forgejo-runner-service.sh b/examples/lxc-systemd/forgejo-runner-service.sh index cc9a124..1d6b965 100755 --- a/examples/lxc-systemd/forgejo-runner-service.sh +++ b/examples/lxc-systemd/forgejo-runner-service.sh @@ -21,7 +21,7 @@ trap "rm -fr $TMPDIR" EXIT : ${INPUTS_FORGEJO:=https://code.forgejo.org} : ${INPUTS_LIFETIME:=7d} : ${INPUTS_LXC_HELPERS_VERSION:=1.0.3} -: ${INPUTS_RUNNER_VERSION:=6.2.2} +: ${INPUTS_RUNNER_VERSION:=6.3.0} : ${KILL_AFTER:=21600} # 6h == 21600 NODEJS_VERSION=20