Question
Scheduled workflows run on the:
- A. specified commit and branch from the workflow YAML file.
- B. latest commit from the branch named schedule.
- C. latest commit and branch on which the workflow was triggered.
- D. latest commit from the branch named main.
- E. latest commit on the default or base branch. Correct
Explanation
GitHub documents that scheduled workflows run on the latest commit on the default branch, and that they only run on the default branch. A schedule has no triggering branch, so the latest commit on the branch that triggered the run does not apply. The default branch need not be named main, and there is no special branch named schedule. The workflow file also cannot pin a commit for a schedule.