The branches key controls whether the current branch should have a schedule trigger
created for it, where current branch is the branch containing the config.yml file with
the trigger stanza.
That is, a push on the main branch will only schedule a
workflow
for the main branch.
Branches can have the keys only and ignore which each map to a single string naming a branch.
You may also use regular expressions to match against branches by enclosing them with /’s,
or map to a list of such strings. Regular expressions must match the entire string.
Any branches that match only will run the job.
Any branches that match ignore will not run the job.
If neither only nor ignore are specified then all branches will run the job.
If both only and ignore are specified, the only is used and ignore will have no effect.
The
branches
key controls whether the current branch should have a schedule trigger created for it, where current branch is the branch containing theconfig.yml
file with the trigger stanza. That is, a push on themain
branch will only schedule a workflow for themain
branch.