Skip to content
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

Replace set-output by $GITHUB_ENV #166

Closed
Yury-Fridlyand opened this issue Oct 17, 2022 · 2 comments · Fixed by #167
Closed

Replace set-output by $GITHUB_ENV #166

Yury-Fridlyand opened this issue Oct 17, 2022 · 2 comments · Fixed by #167

Comments

@Yury-Fridlyand
Copy link
Contributor

Hi

echo ::set-output name=exit_code::$exit_code

set-output function of GHA is deprecated. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
It is recommended to use Environment files instead. An example from GHA docs:

steps:
  - name: Set the value
    id: step_one
    run: |
      echo "action_state=yellow" >> $GITHUB_ENV
  - name: Use the value
    id: step_two
    run: |
      echo "${{ env.action_state }}" # This will output 'yellow'
@Yury-Fridlyand
Copy link
Contributor Author

I can do a PR with the fix, but I'd like to have a confirmation first.

@mre
Copy link
Member

mre commented Oct 18, 2022

Oh that's great news because the current syntax is pretty awful. I'd be thankful for a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants