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

CI: example-custom-ci-build-id uses deprecated set-output method #674

Closed
MikeMcC399 opened this issue Dec 16, 2022 · 1 comment
Closed

Comments

@MikeMcC399
Copy link
Collaborator

example-custom-ci-build-id produces a deprecation warning concerning set-output.

Description

The example workflow example-custom-ci-build-id produces the following Annotations warning:

"The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/"

See for example action log 3706142729

The action includes the following line of code which uses set-output:

run: echo "::set-output name=value::sha-$GITHUB_SHA-time-$(date +"%s")"

Steps to reproduce the issue

Push to the master branch or view any log under
https://github.com/cypress-io/github-action/actions/workflows/example-custom-ci-build-id.yml?query=branch%3Amaster

Expected behavior

Running the example workflow example-custom-ci-build-id should not output a deprecation warning concerning the use of set-output.

Suggested Fix

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ contains detailed information about how to replace set-output, so

run: echo "::set-output name=value::sha-$GITHUB_SHA-time-$(date +"%s")"

is to be replaced by

run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Dec 16, 2022

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

No branches or pull requests

1 participant