tailscale-exitnode #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tailscale-exitnode | |
on: | |
workflow_dispatch: | |
branches: [ main ] | |
jobs: | |
exitnode-test: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/gbraad-devenv/fedora/dotfiles:39 | |
volumes: | |
- workspace:/workspace | |
options: --cpus 1 | |
steps: | |
- name: Tailscale setup (root) | |
run: | | |
sudo dnf update -y tailscale | |
sudo sed -i 's|--state=/var/lib/tailscale/tailscaled.state|--state=/tmp/tailscale.state|' /etc/init.d/tailscaled | |
sudo sed -i 's|--socket=/run/tailscale/tailscaled.sock|--socket=/var/run/tailscale/tailscaled.sock|' /etc/init.d/tailscaled | |
sudo sed -i '/--port 41641/ s/$/\n --tun=userspace-networking \\/' /etc/init.d/tailscaled | |
sudo ssh-keygen -A | |
- name: Tailscale setup (user) | |
run: | | |
sudo chmod o+w /var/run/tailscale/ | |
sudo --preserve-env=TAILSCALE_AUTHKEY /etc/init.d/tailscaled start | |
until sudo tailscale up | |
do | |
sleep 0.1 | |
done | |
sudo tailscale set --hostname github-${HOSTNAME} | |
sudo tailscale set --advertise-exit-node | |
env: | |
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}} | |
- name: Hang around | |
run: | | |
sleep infinity |