-
-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (27 loc) · 1.08 KB
/
tailscale-code.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
name: tailscale-code
on:
workflow_dispatch:
jobs:
code-test:
runs-on: ubuntu-24.04
steps:
- name: Run system container with `podman`
run: |
podman run -d --name code --systemd=always --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --device=/dev/fuse ghcr.io/gbraad-devenv/fedora/code:41
- name: Tailscale setup (root)
run: |
until podman exec code tailscale up --auth-key ${TAILSCALE_AUTHKEY}
do
sleep 0.1
done
podman exec code tailscale set --ssh
podman exec code tailscale set --hostname github-code-${HOSTNAME}
env:
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}}
- name: Hang around
run: |
podman exec -d code code serve-web --without-connection-token
podman exec -d code tailscale serve --bg 8000
URL=`podman exec code tailscale status --peers=false --json | jq '.CertDomains[0]' | sed 's/["]//g'`
echo "Open in your web browser: https://${URL}"
sleep infinity