2026-05-29 11:02:32 -06:00
|
|
|
# WROLPi release poller (oneshot, driven by wrolpi-release.timer).
|
|
|
|
|
#
|
|
|
|
|
# Checks GitHub for a newly-published release and builds + publishes it.
|
|
|
|
|
# This is OUTBOUND polling only -- GitHub never connects to this machine.
|
|
|
|
|
#
|
|
|
|
|
# Install (as root):
|
|
|
|
|
# cp release/wrolpi-release.service release/wrolpi-release.timer /etc/systemd/system/
|
|
|
|
|
# # edit paths/user below to match this host, then:
|
|
|
|
|
# systemctl daemon-reload
|
|
|
|
|
# systemctl enable --now wrolpi-release.timer
|
|
|
|
|
#
|
|
|
|
|
# The builds need root (chroot), so this runs as root. s3cmd therefore reads
|
|
|
|
|
# /root/.s3cfg by default -- either place the Spaces credentials there or point
|
|
|
|
|
# S3CFG at another location below.
|
|
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=WROLPi release poller (build & publish new GitHub releases)
|
|
|
|
|
After=network-online.target
|
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=oneshot
|
|
|
|
|
# Adjust to wherever the WROLPi repo lives on this host (production: /opt/wrolpi).
|
|
|
|
|
WorkingDirectory=/opt/wrolpi/release
|
|
|
|
|
ExecStart=/opt/wrolpi/release/release-watch.sh
|
|
|
|
|
# Persistent state (failure markers, build lock): /var/lib/wrolpi-release
|
|
|
|
|
StateDirectory=wrolpi-release
|
|
|
|
|
Environment=STATE_DIR=/var/lib/wrolpi-release
|
2026-05-31 12:15:32 -06:00
|
|
|
# systemd leaves HOME unset; the pi-gen chroot's `git config --global` needs it.
|
|
|
|
|
Environment=HOME=/root
|
2026-05-29 11:02:32 -06:00
|
|
|
# Uncomment if the s3cmd config is not at /root/.s3cfg:
|
|
|
|
|
#Environment=S3CFG=/home/wrolpi/.s3cfg
|
2026-05-30 14:11:09 -06:00
|
|
|
# Optional: command to notify on release success/failure (gets one message arg).
|
|
|
|
|
# Keep the real path here on the host -- it is intentionally not in the repo.
|
|
|
|
|
#Environment=WROLPI_RELEASE_NOTIFY=/home/wrolpi/bin/notify
|
2026-05-29 11:02:32 -06:00
|
|
|
# A full release builds two images and can run for hours.
|
|
|
|
|
TimeoutStartSec=0
|