0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

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.
This commit is contained in:
Sam Lord 2021-12-14 09:37:38 +00:00
parent 7db12650f9
commit 845ed665f0

View file

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