From e35780ea63d83bb603a227efe8195200d976d621 Mon Sep 17 00:00:00 2001 From: nycki Date: Fri, 27 Dec 2024 23:39:47 +0000 Subject: [PATCH] include runner config --- .forgejo/workflows/build.yaml | 4 ++-- tools/forgejo-runner.service | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tools/forgejo-runner.service diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index c077764..51550c9 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,8 +1,8 @@ -on: +on: workflow_dispatch: push: branches: [main] - + jobs: build: runs-on: self-hosted diff --git a/tools/forgejo-runner.service b/tools/forgejo-runner.service new file mode 100644 index 0000000..14676a9 --- /dev/null +++ b/tools/forgejo-runner.service @@ -0,0 +1,18 @@ +[Unit] +Description=Forgejo Runner +Documentation=https://forgejo.org/docs/latest/admin/actions/ +After=docker.service + +[Service] +ExecStart=forgejo-runner daemon +ExecReload=/bin/kill -s HUP $MAINPID + +# This user and working directory must already exist +User=nycki-forgejo +WorkingDirectory=/opt/nycki-forgejo +Restart=on-failure +TimeoutSec=0 +RestartSec=10 + +[Install] +WantedBy=multi-user.target