Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

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 Reply
Copilot Lvl 3
Message 2 of 2

Re: Test current commit of action

It turns out that


uses: artis3n/ansible_galaxy_collection@HEAD


works just fine.


EDIT: I had verified from the worklow's raw logs that it was pulling down the latest commit of my pull request, however after merging the workflow is throwing an error on code (a class) that does not exist in my latest commit, so it appears to actually be running from master. This question stands.