Skip to content

How can I parse environment variable in my body? #62

Answered by ncipollo
elect86 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

As far as I know, there shouldn't be anything special about the inputs to this action. The typical workflow rules for inputs and environment variables should apply.

In the above example, I think the issue would be that you are trying to reference environment variables directly in the workflow file (ex- tag: $GITHUB_ACTOR-$GITHUB_SHA). Instead, I think you want to be accessing these variables via a context. Environment variables should only be used within the runner itself (so in shell scripts, actions, etc). Checkout the following link: https://docs.github.com/en/actions/reference/environment-variables#determining-when-to-use-default-environment-variables-or-contexts

So to summarize …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@elect86
Comment options

@elect86
Comment options

@ncipollo
Comment options

Answer selected by elect86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants