From 5f5c09e9e765c7469da29ce65e93147c91c1a6bf Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 13 Jan 2025 14:04:17 +0000 Subject: [PATCH] Fix only run on fork guard (#2378) * Fix only run on fork guard The previous guard fails because `github.repository` resolves to the base repository on `pull_request` events. * Fix syntax --- .github/workflows/deploy-pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 983b5d57e7..0e76de64fa 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -11,7 +11,7 @@ on: jobs: deploy-pr-preview: - if: github.repository == 'grafana/alloy' + if: ${{ ! github.event.pull_request.head.repo.fork }} uses: grafana/writers-toolkit/.github/workflows/deploy-preview.yml@main with: sha: ${{ github.event.pull_request.head.sha }}