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

Action doesn't understand the 'secrets' syntax copied from the documentation

Solved! Go to Solution.

I'm trying to pass in a secrets variable as input to my Github Action and I am getting the following error:

 

"##[error](Line: 7, Col: 18): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GALAXY_API_KEY"

 

image.png

 

I'm following this documentation, which has an example showing usage of secrets the same way I am.

My usage: https://github.com/artis3n/github_version-ansible_plugin/blob/master/.github/workflows/ansiblegalaxy...

 

Example failed job: https://github.com/artis3n/github_version-ansible_plugin/commit/f05d3d777beea879d1fa14d38c416b548635...

 

And my secrets panel:

image.png

1 Reply
Solution
Copilot Lvl 3
Message 2 of 2

Re: Action doesn't understand the 'secrets' syntax copied from the documentation

I'm pretty sure this is the problem: https://github.com/artis3n/ansible_galaxy_collection/pull/11/files#diff-689e1a63f106e616debbed3b5aed...

 

I am guessing Github Actions tries to interpolate the value in the description string instead of leaving it raw.

 

EDIT: Yeah, this was the problem. This seems like a bug with Github Actions. Or is there a way to reference variables and telling Actions not to interpolate them? Some option to use a literal string?