Use local workflow with relative path


Is it possible to re-use a local workflow in the same repository using a relative path?
I tried

uses: ./.github/workflows/my-local-workflow.yml

But it complains about the @tag missing, and I’m not sure this is supposed to work anyway. Any tips?

What happens if you add the branch name the main workflow is on as tag, like @main?

That works, but then I’m forced to use the specific branch where I’m developing the workflow, and remember to change it to main before merging, which is a bit inconvenient. I was wondering if there was an alternative

Not sure. It cannot be dynamic because of security reasons but maybe HEAD works as tag? I have doubts that such Git aliases are exposed, however (again because of security concerns).