actions-rs / toolchain

๐Ÿ› ๏ธ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

`set-output` command is deprecated #221

Open duskmoon314 opened 1 year ago

duskmoon314 commented 1 year ago

Do the checklist before filing an issue:

Description

The set-output command is deprecated and we need to upgrade @actions/core to v1.10.0

Currently, this error will show in every action using this action:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. 

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Workflow code

This is just my use case. I believe other cases have the same problem.

- uses: actions-rs/toolchain@v1
  with:
    profile: minimal
    toolchain: ${{ matrix.rust }}
    override: true

Action output

Following is the raw log

2022-10-14T02:49:04.5320394Z ##[group]Gathering installed versions
2022-10-14T02:49:04.5329776Z [command]/home/runner/.cargo/bin/rustc -V
2022-10-14T02:49:04.5835528Z rustc 1.66.0-nightly (6b3ede3f7 2022-10-13)
2022-10-14T02:49:04.5885042Z ##[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/
2022-10-14T02:49:04.5907869Z ##[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/
2022-10-14T02:49:04.5910612Z [command]/home/runner/.cargo/bin/cargo -V
2022-10-14T02:49:04.6299701Z cargo 1.66.0-nightly (b8f30cb23 2022-10-10)
2022-10-14T02:49:04.6302611Z ##[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/
2022-10-14T02:49:04.6309793Z [command]/home/runner/.cargo/bin/rustup -V
2022-10-14T02:49:04.6351698Z rustup 1.25.1 (bb60b1e89 2022-07-12)
2022-10-14T02:49:04.6352373Z info: This is the version for the rustup toolchain manager, not the rustc compiler.
2022-10-14T02:49:04.6848281Z info: The currently active `rustc` version is `rustc 1.66.0-nightly (6b3ede3f7 2022-10-13)`
2022-10-14T02:49:04.6862719Z ##[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/
2022-10-14T02:49:04.6864583Z ##[endgroup]

Expected behavior

Upgrade @actions/core to v1.10.0 or above (is exist)

Additional context

N/A

Bromeon commented 1 year ago

We might wait a long time here, given that this project has been unmaintained for almost 2 years: #216

duskmoon314 commented 1 year ago

For people who want to try an alternative: Currently, I am testing invoke rustup directly in GitHub actions and it seems to be working fine. Also, there is dtolnay's rust-toolchain action. (Maybe named as dtolnay/rust-toolchain)

Bromeon commented 1 year ago

For people who want to try an alternative: Currently, I am testing invoke rustup directly in GitHub actions and it seems to be working fine.

Same, I added a small example here.

kachkaev commented 1 year ago

@svartalf ๐Ÿ™ (could you please ping someone else if you donโ€™t have capacity?)

AliSajid commented 1 year ago

@svartalf I'd be happy to take a look at this and send a pull request

kachkaev commented 1 year ago

@AliSajid https://github.com/actions-rs/toolchain/pull/222 should solve it

marcsantiago commented 1 year ago

Bump^ does anyone know the status of these changes?

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

Screenshot 2023-05-02 at 12 18 33 PM

Warning are still being thrown in actions.

AliSajid commented 1 year ago

Bump^ does anyone know the status of these changes?

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

Screenshot 2023-05-02 at 12 18 33 PM

Warning are still being thrown in actions.

I've stopped using these actions and rely on dtolnay/rust-toolchain instead. I recommend the same.

marcsantiago commented 1 year ago

@AliSajid thank you! Just changed out that 1 line in the actions file and everything works all the same.

Bromeon commented 1 year ago

I don't know why everyone wants an external action for this, most use cases simply need a rustup command ๐Ÿ™‚

Runners come with rustup installed, here's a usage example I posted a while ago.