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

refacto: stop using deprecated github action set-output command #8

Merged

Conversation

shouze
Copy link
Contributor

@shouze shouze commented Oct 23, 2022

Related to https://github.com/gogaille/guest-journey/issues/7514

See this post 👀

Examples

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

[See this post 👀 ](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/)

## Examples

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

```yaml
- 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:

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

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

```
@shouze shouze self-assigned this Oct 23, 2022
@shouze shouze merged commit d50ff69 into main Oct 23, 2022
@shouze shouze deleted the refacto-stop-using-deprecated-github-action-set-output-command branch October 23, 2022 17:41
@shouze shouze added the enhancement New feature or request label Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant