A workflow needs a reason to run. In GitHub Actions, the on section names events that can start it. An event can be a push to a branch, a change to a pull request, or another supported action.
Continuous Integration · Lesson 2
Workflow Triggers
Learn to predict when a GitHub Actions workflow runs from its event and branch filters.