From 845ed665f07d7dae79456ef1e90562496df17e1e Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Tue, 14 Dec 2021 09:37:38 +0000 Subject: [PATCH] Prevent TailScale failures from breaking the build no issue Includes a timeout if TailScale is completely inaccessible, and a continue-on-error statement which should handle all forms of failure. The following step also includes a continue-on-error step, as reporting metrics depends on TailScale succeeding, and should also never fail the build. --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ebb336be5..0f62861153 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -134,14 +134,20 @@ jobs: endTime="$(date +%s)" echo "test_time=$(($endTime-$startTime))" >> $GITHUB_ENV + # Continue on error if TailScale service is down - name: Tailscale Action + timeout-minutes: 2 + continue-on-error: true if: (github.event_name == 'push' && github.repository_owner == 'TryGhost') || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'TryGhost/')) uses: tailscale/github-action@v1 with: authkey: ${{ secrets.TAILSCALE_AUTHKEY }} # Report time taken to metrics service + # Continue on error if previous TailScale step fails - uses: sam-lord/action-trigger-metric@main + timeout-minutes: 1 + continue-on-error: true if: (github.event_name == 'push' && github.repository_owner == 'TryGhost') || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'TryGhost/')) with: metricName: 'test-time'