Trigger builds on main branch push

This is tricky. I wish we could trigger on all branches push, but it seems like internal PRs are run twice when using this:

```yaml

on:
  pull_request: {}
  push: {}
```

So specifying a branch is a bit better somehow. Related discussions:
* https://github.community/t/how-to-run-a-workflow-only-once-even-when-triggered-mutliple-times/16436
* https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
This commit is contained in:
Gabriel Le Breton 2020-10-19 12:46:48 -04:00 committed by GitHub
parent f186bd3e30
commit 7a8fa4b427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ name: Unity Actions
on: on:
pull_request: {} pull_request: {}
push: {} push: { branches: [main] }
env: env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}