generated from gbraad-devenv/ubi9-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (29 loc) · 1.06 KB
/
tailscale-ssh.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
name: tailscale-ssh
on:
workflow_dispatch:
jobs:
tailscale-test:
runs-on: ubuntu-24.04
steps:
- name: Run system container with `podman`
run: |
podman run -d --name code --hostname code-${HOSTNAME} --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/ubi9-gotoolset/systemd:1.22.7
- 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 chmod 640 /etc/shadow
env:
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}}
- name: Hang around
run: |
until podman exec code systemctl is-active --quiet tailscaled
do
sleep 1
done
IP=`podman exec code tailscale ip -4`
echo "Use the following command to connect \`tailscale ssh gbraad@${IP}\`"
sleep infinity