Add conditional on head_repo on Netlify main GHA job

As per comment
This commit is contained in:
David Baker 2022-12-22 20:22:54 +00:00
parent 0488cbdd8c
commit d1091eda17

View file

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