Make the push target more specific
This will reduce the amount of pipelines executed in PRs to once instead of twice due to two targets matching previously in PRs.
Overview
When running pipelines on existing Pull Requests, it's very likely that the testing pipelines will be executed twice. That is becuase both push and pull_request criteria match when pushing new code on the branch that has an open Pull Request.
This PR adjusts the push target to only be executed on main branch to reduce the amount of pipelines executed on Pull Requests. A similar thing has been done for load-secrets-action's testing pipeline as part of https://github.com/1Password/load-secrets-action/pull/87, followed by https://github.com/1Password/load-secrets-action/pull/90.
Type of change
- [ ] Created a new plugin
- [ ] Improved an existing plugin
- [ ] Fixed a bug in an existing plugin
- [x] Improved contributor utilities or experience
Related Issue(s)
How To Test
Check that the pipeline will only execute the Test and Validate once from the pull_request target. Compare that with https://github.com/1Password/shell-plugins/pull/505: