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

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”

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

My usage:

Example failed job:

And my secrets panel:

I’m pretty sure this is the problem:

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?

1 Like

@artis3n I’m setting up a workflow template to be used by multiple repos and running into this same issue. In the workflow file deployed to each service, it is pulling in the template repository to run scripts as steps. Using secrets directly in the workflow pulled in the secrets just fine, but trying to reference them from another repository is giving me the error. Were you able to find a solution for this or did you just remove the reference?

My issue was {{ }} in my action.yml was getting interpolated instead of being a raw string. I ended up removing the reference.