I'd like to abstract some of my GitHub Actions with a reusable workflow.
In order to do this, I need to call my newly defined callable workflow in the format {owner}/{repo}/{path}/{filename}@{ref}
e.g. (from the docs)
jobs:
call-workflow-1:
uses: octo-org/this-repo/.github/workflows/workflow-1.yml@172239021f7ba04fe7327647b213799853a9eb89
call-workflow-2:
uses: octo-org/another-repo/.github/workflows/workflow-2.yml@v1
However, in practice, I'm working on my branch, some-branch-name, where I'm working on my workflow-1.yml file and I'd like to be able to run my actions as defined in my current branch, Given
`{ref} can be a SHA, a release tag, or a branch name.
It seems like I'd need to use
jobs:
call-workflow-1:
uses: octo-org/this-repo/.github/workflows/workflow-1.yml@some-branch-name
But, I'd like this to work for any branch, so
jobs:
call-workflow-1:
uses: octo-org/this-repo/.github/workflows/workflow-1.yml@${{ github.ref }}
But, it turns out this isn't possible as expressions can't be used in the uses attributes.
How can I achieve this?