Skip to content

Sharing a variable between jobs #26313

Answered by dimisjim
schof asked this question in Actions
Nov 20, 2019 · 20 comments · 10 replies
Discussion options

You must be logged in to vote

EDIT 2022/10

Due to deprecation of set-output the reccomended approach is now: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter

echo "{name}={value}" >> $GITHUB_OUTPUT

      - name: Set color
        id: random-color-generator
        run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT
      - name: Get color
        run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"

Replies: 20 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@eliezercazares
Comment options

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
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
1 reply
@NikolozCh
Comment options

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
4 replies
@IanVS
Comment options

@dimisjim
Comment options

@kautlenbachs
Comment options

@SimonDarksideJ
Comment options

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
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@airtower-luna
Comment options

@alienxp03
Comment options

@OctavianCahyadi
Comment options

@airtower-luna
Comment options

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
Labels
None yet