From ac2f1470efbdf01d5ca10049196265008b19be50 Mon Sep 17 00:00:00 2001 From: Mathieu Strypsteen Date: Sat, 18 Nov 2023 09:32:44 +0100 Subject: [PATCH] Add Gitea Actions --- .gitea/workflows/shellcheck.yaml | 12 ++++++++++++ container-config/act-runner/config.yaml | 2 ++ container-config/synapse/homeserver.yaml | 2 +- .../systemd/users/1500/act-runner.container | 16 ++++++++++++++++ .../systemd/users/1500/act-runner.volume | 0 .../systemd/user/podman.service.d/override.conf | 2 ++ homeserver/var/lib/systemd/linger/act-runner | 0 setup-server.sh | 1 + 8 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/shellcheck.yaml create mode 100644 container-config/act-runner/config.yaml create mode 100644 homeserver/etc/containers/systemd/users/1500/act-runner.container create mode 100644 homeserver/etc/containers/systemd/users/1500/act-runner.volume create mode 100644 homeserver/etc/systemd/user/podman.service.d/override.conf create mode 100644 homeserver/var/lib/systemd/linger/act-runner diff --git a/.gitea/workflows/shellcheck.yaml b/.gitea/workflows/shellcheck.yaml new file mode 100644 index 0000000..77610ae --- /dev/null +++ b/.gitea/workflows/shellcheck.yaml @@ -0,0 +1,12 @@ +name: ShellCheck +on: [push] +jobs: + shellcheck: + runs-on: debian-12 + steps: + - name: Install ShellCheck + run: apt-get update && apt-get install shellcheck + - name: Checkout + uses: actions/checkout@v4 + - name: Run ShellCheck + run: shellcheck *.sh diff --git a/container-config/act-runner/config.yaml b/container-config/act-runner/config.yaml new file mode 100644 index 0000000..63a9852 --- /dev/null +++ b/container-config/act-runner/config.yaml @@ -0,0 +1,2 @@ +container: + docker_host: '-' diff --git a/container-config/synapse/homeserver.yaml b/container-config/synapse/homeserver.yaml index 5c17632..ef7f39e 100644 --- a/container-config/synapse/homeserver.yaml +++ b/container-config/synapse/homeserver.yaml @@ -13,6 +13,6 @@ listeners: trusted_key_servers: - server_name: matrix.org suppress_key_server_warning: true -turn_uris: ["turn:vps.strypsteen.com"] +turn_uris: ['turn:vps.strypsteen.com'] turn_allow_guests: false delete_stale_devices_after: 1y diff --git a/homeserver/etc/containers/systemd/users/1500/act-runner.container b/homeserver/etc/containers/systemd/users/1500/act-runner.container new file mode 100644 index 0000000..0b9b998 --- /dev/null +++ b/homeserver/etc/containers/systemd/users/1500/act-runner.container @@ -0,0 +1,16 @@ +[Container] +Image=docker.io/gitea/act_runner +LogDriver=none +SecurityLabelDisable=true +Volume=/var/lib/system-config/container-config/act-runner:/etc/act-runner:O +Volume=/run/user/1500/podman/podman.sock:/run/docker.sock:Z +Volume=act-runner.volume:/data:U,Z +Tmpfs=/root/.cache +Environment=CONFIG_FILE=/etc/act-runner/config.yaml +Environment=GITEA_INSTANCE_URL=https://git.strypsteen.me +Environment=GITEA_RUNNER_NAME=home +Environment=GITEA_RUNNER_LABELS=debian-12:docker://node:bookworm +Secret=GITEA_RUNNER_REGISTRATION_TOKEN,type=env +AutoUpdate=registry +[Install] +WantedBy=default.target diff --git a/homeserver/etc/containers/systemd/users/1500/act-runner.volume b/homeserver/etc/containers/systemd/users/1500/act-runner.volume new file mode 100644 index 0000000..e69de29 diff --git a/homeserver/etc/systemd/user/podman.service.d/override.conf b/homeserver/etc/systemd/user/podman.service.d/override.conf new file mode 100644 index 0000000..b1408fb --- /dev/null +++ b/homeserver/etc/systemd/user/podman.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +Environment= diff --git a/homeserver/var/lib/systemd/linger/act-runner b/homeserver/var/lib/systemd/linger/act-runner new file mode 100644 index 0000000..e69de29 diff --git a/setup-server.sh b/setup-server.sh index 341b9a9..7182a33 100644 --- a/setup-server.sh +++ b/setup-server.sh @@ -3,4 +3,5 @@ set -e cp -R server/* / systemctl disable --now docker.socket rpm-ostree-countme.timer systemctl enable --now podman-auto-update.timer +systemctl enable --global podman-auto-update.timer useradd -M containers || true