From d1091eda17c020cf71483b01113d1600b3153b5a Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 22 Dec 2022 20:22:54 +0000 Subject: [PATCH] Add conditional on head_repo on Netlify main GHA job As per comment --- .github/workflows/netlify-main.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/netlify-main.yaml b/.github/workflows/netlify-main.yaml index ad1f3cd..5ba15a6 100644 --- a/.github/workflows/netlify-main.yaml +++ b/.github/workflows/netlify-main.yaml @@ -12,7 +12,11 @@ jobs: runs-on: ubuntu-latest permissions: deployments: write - if: github.event.workflow_run.conclusion == 'success' + # Important: the 'branches' filter above will match the 'main' branch on forks, + # so we need to check the head repo too in order to not run on PRs from forks + # We check the branch name again too just for completeness + # (Is there a nicer way to see if a PR is from a fork?) + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'main' steps: - name: Create Deployment uses: bobheadxi/deployments@v1