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

set-output command deprecation #75

Closed
HardNorth opened this issue Nov 3, 2022 · 5 comments
Closed

set-output command deprecation #75

HardNorth opened this issue Nov 3, 2022 · 5 comments

Comments

@HardNorth
Copy link

Hi!
Thanks for the useful action. Unfortunately lately we started getting this 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/

Could you please update your @actions/core dependency to at least version 1.10.0.
Thank you!

@mindsers
Copy link
Owner

Should be fixed by v2.2.1

@guihkx
Copy link

guihkx commented Nov 15, 2022

Hello @mindsers, I'm still seeing these warnings with 2.2.1:

image

Any clues?

@guihkx
Copy link

guihkx commented Nov 15, 2022

(Aside: The README claims validation_depth is set to 0 by default, but in the screenshot above it's set to 10 and I haven't configured it).

@HardNorth
Copy link
Author

HardNorth commented Nov 15, 2022

Agree, I'm seeing the same issue. For some reasons compiled version of the action has not changed:
https://github.com/mindsers/changelog-reader-action/blob/master/dist/index.js#L2878

function setOutput(name, value) {
    process.stdout.write(os.EOL);
    command_1.issueCommand('set-output', { name }, value);
}

This is how it should look like:

function setOutput(name, value) {
    const filePath = process.env['GITHUB_OUTPUT'] || '';
    if (filePath) {
        return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
    }
    process.stdout.write(os.EOL);
    command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
}

@mindsers
Copy link
Owner

Looking. Weird that the built version didn't change. I'll publish a new version with the fix soon.

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

3 participants