Signal-iOS/.github/workflows
Evan Hahn 84ebba40a2 CI: only run precommit script for pull requests
According to [GitHub's docs][0], the `github.base_ref` property "is only
available when the event that triggers a workflow run is either
`pull_request` or `pull_request_target`.

Because of this, pushes were running the following command...

    python3 Scripts/precommit.py --ref origin/

...and getting this error:

    fatal: ambiguous argument 'origin/': unknown revision or path not in the working tree.

This has been broken for a long time, but it didn't cause CI to fail until
d7c33eb211.

After some discussion, we decided not to run these on pushes to `master`
or `release/*`.

(See also: [this GitHub issue][1] which asks for clarification.)

[0]: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
[1]: https://github.com/github/docs/issues/13810
2022-04-04 09:57:24 -05:00
..
main.yml CI: only run precommit script for pull requests 2022-04-04 09:57:24 -05:00