fix: start tailscaled daemon before tailscale up in CI
Some checks failed
Deploy Cluster / Terraform (push) Successful in 35s
Deploy Cluster / Ansible (push) Failing after 2m15s

This commit is contained in:
2026-03-01 13:52:20 +00:00
parent 97084c1581
commit a8ef173713

View File

@@ -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