-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 1.11 KB
/
tailscale-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: tailscale-deploy
on:
workflow_dispatch:
jobs:
forgejo-test:
runs-on: ubuntu-24.04
steps:
- name: Remove unwanted stuff
uses: gbraad-actions/remove-unwanted@v1
- name: Run system container with `podman`
run: |
podman run -d --name forgejo --hostname forgejo-${HOSTNAME} --systemd=always --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --device=/dev/fuse --cap-add AUDIT_CONTROL ghcr.io/gbraad-homelab/forgejo:latest
- name: Tailscale setup (root)
run: |
until podman exec forgejo tailscale up --auth-key ${TAILSCALE_AUTHKEY}
do
sleep 0.1
done
env:
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}}
- name: Hang around
run: |
until podman exec forgejo systemctl is-active --quiet tailscaled
do
sleep 1
done
podman exec forgejo tailscale funnel --bg 3000
IP=`podman exec forgejo tailscale ip -4`
echo "Open in your browser: http://${IP}:3000"
sleep infinity