From 0955caf311c81f25d11cbc5e7a4cca78d27df300 Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Thu, 11 Nov 2021 10:02:26 +0000 Subject: [PATCH] Prevent Tailscale running in PRs on forks --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d97526e9a..264d4e9a30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,14 +126,14 @@ jobs: echo "test_time=$(($endTime-$startTime))" >> $GITHUB_ENV - name: Tailscale Action - if: github.repository_owner == 'TryGhost' + if: github.event_name == 'push' || startsWith(github.head_ref, 'TryGhost/') uses: tailscale/github-action@v1 with: authkey: ${{ secrets.TAILSCALE_AUTHKEY }} # Report time taken to metrics service - uses: sam-lord/action-trigger-metric@main - if: github.repository_owner == 'TryGhost' + if: github.event_name == 'push' || startsWith(github.head_ref, 'TryGhost/') with: metricName: 'test-time' metricValue: ${{ env.test_time }}