Can we specify the default branch in workflows?

I want to provide an example workflow for my GitHub Action and it would be nice to be able to just write default in the workflow and it would resolve to master or main or whatever else is the name of the default branch.

We support a macro in templates for that https://github.com/actions/starter-workflows/blob/dacfd0a22a5a696b74a41f0b49c98ff41ef88427/ci/deno.yml#L13. But not at runtime.

1 Like