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

Test current commit of action

Solved! Go to Solution.

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
Highlighted
Solution
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: it does not)

 

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