From c38145cafe41d7bd6f92c4b4302bc0da4a3cb490 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 10 Jan 2025 10:49:51 +0000 Subject: [PATCH] Fix only run on fork guard The previous guard fails because `github.repository` resolves to the base repository on `pull_request` events. Signed-off-by: Jack Baldry --- .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 1bb8aea2897c8..d48e559706ecc 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/loki' + 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 }}