Skip to content

What I am doing wrong here? #26314

Discussion options

You must be logged in to vote
run: |
  echo "artifactname=${{ env.rollbackartifact }}" >> $GITHUB_ENV
  echo ${env:artifactname}

There are two problems here:

  1. You try to set an environment variable variable via GITHUB_ENV and use it in the same run step. That doesn’t work, writing to GITHUB_ENV affects following steps within the job.
  2. ${env:artifactname} isn’t valid Unix shell syntax. If you want to use the artifactname environment variable, the correct code is ${artifactname}.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants