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