Skip to content

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

@MikeMcC399

Description

@MikeMcC399

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions