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

Update our Actions to avoid set-output command #1560

Closed
dfreilich opened this issue Nov 27, 2022 · 2 comments · Fixed by #1564
Closed

Update our Actions to avoid set-output command #1560

dfreilich opened this issue Nov 27, 2022 · 2 comments · Fixed by #1564
Labels
good first issue A good first issue to get started with. size/sm Small level of effort type/chore Issue that requests non-user facing changes.

Comments

@dfreilich
Copy link
Member

dfreilich commented Nov 27, 2022

Description

A number of times in our Github Actions we use the set-output command to pass state from one stage to another. That is being deprecated in a number of months, and we should migrate to Github's new recommend path.

This is mentioned in the annotations of this job: https://github.com/buildpacks/pack/actions/runs/3558882069

Proposed solution

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

Additional context

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files

@dfreilich dfreilich added size/sm Small level of effort good first issue A good first issue to get started with. type/chore Issue that requests non-user facing changes. labels Nov 27, 2022
@SaumyaBhushan
Copy link
Contributor

Hey @dfreilich I would like to work on this issue .

@SaumyaBhushan
Copy link
Contributor

@dfreilich @natalieparellano Please review the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. size/sm Small level of effort type/chore Issue that requests non-user facing changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants