Self reference a shared workflow_call for testing

I have repository with shared workflow - workflow_call

Now I would add to the same repository next workflow which test my shared workflow.

Syntax for referencing shared workflow is:


I tried some think like:

    name: Verify
    uses: ${{ github.repository }}/.github/workflows/maven-verify-with-its.yml@${{ github.sha }}


   uses: ./.github/workflows/maven-verify-with-its.yml@${{ github.sha }}

but I have error:

invalid value workflow reference: references to workflows must be prefixed with format 'owner/repository/'

Do you know any way how to achieve this.

1 Like

Hi @slawekjaranowski, we don’t support dynamic values in uses, so you’ll need to use the full path. You may want to follow along on this thread, as that is where I’ll be posting updates about supporting this.

1 Like

Is there any other way to reference the current version of a shared workflow?
I don’t think this question is particularly about "dynamic values in uses", but more about a handy way to test a shared workflow during development.

When calling a composite action, you can simply omit the @{ref} part of the uses like so:

uses: ./.github/actions/some-composite-action

Would be neat if this was possible for shared workflows as well…
So far I’ve found that using the current branch name work:

uses: my-org/my-repo/.github/workflows/some-shared-workflow.yml@name-of-current-branch

This will cause problems when merged…