From a8ef17371319511fda98c92f9409525a69dde1c2 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sun, 1 Mar 2026 13:52:20 +0000 Subject: [PATCH] fix: start tailscaled daemon before tailscale up in CI --- .gitea/workflows/deploy.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ffbf2a6..074cec1 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -194,8 +194,31 @@ jobs: - name: Install Tailscale on runner run: curl -fsSL https://tailscale.com/install.sh | sh + - name: Start tailscaled daemon + run: | + mkdir -p /var/run/tailscale + mkdir -p /var/lib/tailscale + nohup tailscaled \ + --socket=/var/run/tailscale/tailscaled.sock \ + --state=/var/lib/tailscale/tailscaled.state \ + >/tmp/tailscaled.log 2>&1 & + for i in $(seq 1 20); do + tailscale --socket=/var/run/tailscale/tailscaled.sock status >/dev/null 2>&1 && break + sleep 1 + done + - name: Connect runner to tailnet - run: tailscale up --authkey "${{ secrets.TAILSCALE_CI_AUTH_KEY }}" --hostname "gitea-runner-${{ github.run_number }}" --ssh=false --accept-routes=false + run: | + tailscale --socket=/var/run/tailscale/tailscaled.sock up \ + --authkey "${{ secrets.TAILSCALE_CI_AUTH_KEY }}" \ + --hostname "gitea-runner-${{ github.run_number }}" \ + --ssh=false \ + --accept-routes=false + + - name: Verify runner tailnet status + run: | + tailscale --socket=/var/run/tailscale/tailscaled.sock status + tailscale --socket=/var/run/tailscale/tailscaled.sock ip -4 - name: Install Ansible Collections run: ansible-galaxy collection install -r ansible/requirements.yml