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
I tried to use it in my workflow:
name: Deploy
on:
pull_request:
branches: [ $default-branch ]
push:
branches: [ $default-branch, 'production' ]
But workflow is not triggered when a PR is submitted. Any idea ?