diff --git a/README.md b/README.md index 3ad4da3..187dbe9 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,26 @@ GITEA_RUNNER_VERSION=1.0.2 ./build.sh The script downloads the Linux `amd64` and `arm64` release artifacts, verifies their SHA256 checksums, builds `.deb` packages, moves them into `../gitea-runner-deb`, regenerates `Packages`, `Packages.gz`, and `Release`, then commits the release repo changes locally. It does not push either repository. + +## Systemd Timer + +Install and enable the nightly build timer: + +```bash +cp systemd/gitea-runner-build.service /etc/systemd/system/ +cp systemd/gitea-runner-build.timer /etc/systemd/system/ +systemctl daemon-reload +systemctl enable --now gitea-runner-build.timer +``` + +Check the timer: + +```bash +systemctl list-timers gitea-runner-build.timer +``` + +Run the build manually through systemd: + +```bash +systemctl start gitea-runner-build.service +``` diff --git a/systemd/gitea-runner-build.service b/systemd/gitea-runner-build.service new file mode 100644 index 0000000..3171bd0 --- /dev/null +++ b/systemd/gitea-runner-build.service @@ -0,0 +1,8 @@ +[Unit] +Description=Build Gitea Runner Debian packages + +[Service] +Type=oneshot +WorkingDirectory=/home/users/tracer/gitea-runner-deb-builder +ExecStart=/bin/bash /home/users/tracer/gitea-runner-deb-builder/wrapper.sh +User=tracer diff --git a/systemd/gitea-runner-build.timer b/systemd/gitea-runner-build.timer new file mode 100644 index 0000000..791db5e --- /dev/null +++ b/systemd/gitea-runner-build.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run Gitea Runner build script nightly + +[Timer] +OnCalendar=*-*-* 02:15:00 +Persistent=true + +[Install] +WantedBy=timers.target