We have workflow in GitHub Actions which has both types that trigger on event, e.g.pull-request, and on schedule.
Most of the steps are the same except for running test step. What we would like is:
- On pull-request without specific label provided: execute smoke test
- On pull-request with specific label OR on schedule: execute full test
The check for label can be done with contains(github.event.pull_request.labels.*.name, 'full-tests').
The question is how to check when the it is run on schedule? From my understanding of the documentation, when on schedule there is no payload for github.event for schedule. However checking github.event == null doesn't seems to work.
Is there a specific way to check whether it is running on schedule?