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