Files
Gitea-Action-Runner/act-runner/DEBIAN/preinst
Cantibra c88a39e5dc
All checks were successful
Gitea Action Runner / Gitea Action Runner (amd64, bookworm trixie noble, main) (push) Successful in 26s
Gitea Action Runner / Gitea Action Runner (arm64, bookworm trixie noble, main) (push) Successful in 26s
Initialize Git Repository: 'Gitea-Action-Runner'
2026-03-19 14:15:58 +01:00

40 lines
2.3 KiB
Bash

#!/usr/bin/sh
set -e
set -u
case "${1}" in
install)
if ! /usr/bin/getent passwd 'git' > '/dev/null' 2>&1; then
/usr/sbin/adduser --quiet \
--system \
--home '/nonexistent' \
--shell '/usr/sbin/nologin' \
--no-create-home \
--group \
--disabled-password \
--disabled-login \
'git' > '/dev/null' 2>&1
/usr/bin/echo "########################################################################"
/usr/bin/echo "# #"
/usr/bin/echo "# ! Run this commands as User 'git' and add your Gitea-Credentials ! #"
/usr/bin/echo "# ! to activate the Gitea Action Runner ! #"
/usr/bin/echo "# #"
/usr/bin/echo "# /usr/bin/sudo --user='git' \ #"
/usr/bin/echo "# /usr/bin/act_runner register \ #"
/usr/bin/echo "# --config '/etc/act_runner/act_runner.yaml' \ #"
/usr/bin/echo "# --no-interactive \ #"
/usr/bin/echo "# --instance 'https://<URL>/' \ #"
/usr/bin/echo "# --labels '<LABEL>:<HOST>' \ #"
/usr/bin/echo "# --name '<NAME>' \ #"
/usr/bin/echo "# --token '<TOKEN>' #"
/usr/bin/echo "# #"
/usr/bin/echo "# /bin/chmod '0440' '/etc/act_runner/act_runner' #"
/usr/bin/echo "# #"
/usr/bin/echo "# /bin/chgrp 'root' '/etc/act_runner/act_runner' #"
/usr/bin/echo "# #"
/usr/bin/echo "########################################################################"
fi
;;
esac