Merge pull request #811 from vector-im/dbkr/gha_filter_on_head_repo

Add conditional on head_repo on Netlify main GHA job
This commit is contained in:
Robin 2022-12-22 18:51:20 -05:00 committed by GitHub
commit 5e47a439ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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