Skip to content

set-output deprecated #35994

Answered by kcgen
funes79 asked this question in Actions
Oct 13, 2022 · 13 comments · 14 replies
Discussion options

You must be logged in to vote

Automatic conversion one-liner

Changelog:

  • 2022-Oct-17: Updated to handle @funes79's complex AWS line below. Thanks for flagging this @funes79!

If you're using echo "::set-output name=key::val" syntax, this GNU sed one liner should get you most of the way:

Bash-based workflows:

sed \
  -i \
  '/set-output/ { 
    s/::set-output name=//;
    s/::/=/;
    s/"$/" >> $GITHUB_OUTPUT/;
  }' \
  .github/workflows/bash-workflows.yml

Powershell-based workflows:

sed \
  -i \
  '/set-output/ { 
    s/::set-output name=//;
    s/::/=/;
    s/"$/" >> $env:GITHUB_OUTPUT/;
  }' \
  .github/workflows/powershell-workflows.yml

After running it, inspect the git diff and make any final touches that aren't p…

Replies: 13 comments 14 replies

Comment options

You must be logged in to vote
7 replies
@codeaphex
Comment options

@deitry
Comment options

@Justin-JHG
Comment options

@ptfw
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@deitry
Comment options

@funes79
Comment options

@kcgen
Comment options

@funes79
Comment options

@kcgen
Comment options

Answer selected by funes79
Comment options

You must be logged in to vote
0 replies

This comment was marked as spam.

This comment was marked as spam.

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@airtower-luna
Comment options

Comment options

You must be logged in to vote
1 reply
@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
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
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback