Test current commit of action

When I put up a PR to my Action, I want to run a workflow that test’s that commit to see whether the code changes break the action before publishing a release to the marketplace. I’m trying to do:

uses: artis3n/ansible_galaxy_collection@${{ github.sha }}

However it doesn’t seem like Actions lets me specify a variable in the ‘uses’ section. Is there a way I can get the action to test on its current commit hash before merging changes and publishing a release?

This is the error I’m getting when trying the above:

- Your workflow file was invalid: The pipeline is not valid. .github/workflows/main.yml (Line: 19, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.sha
1 Like

It turns out that

uses: artis3n/ansible_galaxy_collection@HEAD

works just fine. (EDIT: it does not)

GitHub Actions now has support for this, with uses: /