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

Github Actions: "set-output" deprecation #312

Closed
vielmetti opened this issue Jan 9, 2023 · 3 comments
Closed

Github Actions: "set-output" deprecation #312

vielmetti opened this issue Jan 9, 2023 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@vielmetti
Copy link

Noted in the logs, a complaint from Github about the "set-output" command, as seen in the "Setup SSH

- name: Setup ssh
working-directory: ${{ github.repository }}
id: setup_ssh
run: |
ssh-keygen -t rsa -f /tmp/sshkey -q -N ""
eval `ssh-agent -s`
ssh-add /tmp/sshkey
ssh_id=$(metal ssh-key create --key "$(cat /tmp/sshkey.pub)" --label ${SSH_KEY} -o json | jq -r '.id')
echo ::set-output name=ssh_id::${ssh_id}
env:
METAL_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}

The feature is being deprecated, per

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

and the suggested fix is something like this:

A workflow using save-state or set-output like the following

- name: Save state
  run: echo "::save-state name={name}::{value}"

- name: Set output
  run: echo "::set-output name={name}::{value}"

should be updated to write to the new GITHUB_STATE and GITHUB_OUTPUT environment files:

- name: Save state
  run: echo "{name}={value}" >> $GITHUB_STATE

- name: Set output
  run: echo "{name}={value}" >> $GITHUB_OUTPUT

@vielmetti
Copy link
Author

There is a little time to fix this:

We are monitoring telemetry for the usage of these commands and plan to fully disable them on 31st May 2023. Starting 1st June 2023 workflows using save-state or set-output commands via stdout will fail with an error.

@denis-tingaikin
Copy link
Member

@vielmetti Many thanks for the report. Should be resolved for the packet testing by #315

@github-project-automation github-project-automation bot moved this from Under review to Done in Release v1.8.0 Feb 3, 2023
@denis-tingaikin
Copy link
Member

Seems like its still actual, because some of repos were updated incorrectly.

@wazsone Could you please re-do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

3 participants