-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use new github action output format #139
Conversation
Should probably hold on to this PR until 2023 as it's not compatible with old runners, they are removing the old way 31st May 2023. |
I don't see where they said old runners don't support it? they've had this syntax for a while now, so old runners should support it, they just don't warn about stdout being depreciated obviously. I added this and never documented it, so I doubt many people use it. I'd follow the GitHub convention with upper casing the env var and think it's fine to push it. Anyone that actually uses it will probably check here if it stopped working (i think the path in |
Fun fact: it's not env var, it's output var. And yes, there's a difference, output vars are NOT case sensitive while env vars ARE case sensitive. - name: Set color
id: random-color-generator
run: |
echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT
echo "selected_color=red" >> $GITHUB_OUTPUT
echo "SELECTED_COLOR=green" >> $GITHUB_ENV
echo "selected_color=red" >> $GITHUB_ENV
- name: Get colors
run: |
echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"
echo "The selected color is ${{ steps.random-color-generator.outputs.selected_color }}"
echo "The selected color is ${{ env.SELECTED_COLOR }}"
echo "The selected color is ${{ env.selected_color }}" |
I'm in the process of adding this script to Questie so I had a chance to test this PR. Log without PR (Questie/Questie@764f08d):
Log with PR (Questie/Questie@f462809):
Note that I am using In conclusion, PR seems fine as is, without upper-casing. |
ab43a5b
to
6137663
Compare
@nebularg, can you update the v2 tag? Thank you. |
GitHub has deprecated the
set-output
meta-methods of actions/workflows for something better. The workflow throws a warning with the current implementation.To read this output use
${{ steps.packager.outputs.archive_path }}
(same as before).More info: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
New docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter