Skip to content

how to set action env variables within a shell script? #27127

Discussion options

You must be logged in to vote

Hi @andy-brainome , 

The set-env command will add environment variable to all the following steps in the current job. 

What’s your meaning of “action build variables” ? If you want to use the env in action’s input under with section, you could use 

${{ env.VERSION_TAG }} to get the value of it. For example: 

- name: Create Release
      id: create_release
      uses: actions/create-release@latest
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
      with:
        tag_name: ${{ env.VERSION_TAG }}

Replies: 5 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
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
4 participants