diff mbox series

[2/4] ci: avoid deprecated `set-output` workflow command

Message ID 1693393443975bc25f3020e61a29944804e35601.1670423680.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Avoid using deprecated features in Git's GitHub workflows | expand

Commit Message

Johannes Schindelin Dec. 7, 2022, 2:34 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Due to security concerns, this command was deprecated and we need to
write into `$GITHUB_OUTPUT` instead. For more details, see
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Taylor Blau Dec. 7, 2022, 10:24 p.m. UTC | #1
On Wed, Dec 07, 2022 at 02:34:38PM +0000, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Due to security concerns, this command was deprecated and we need to
> write into `$GITHUB_OUTPUT` instead. For more details, see
> https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

OK, this one and [1] are pretty similar. I don't have a strong
preference between one or the other, though I suspect it will be easier
for the maintainer to pick them all up from the same series.

So in that sense I guess I have a slight preference for this one, though
I admit to not feeling very strongly about it ;-).

Thanks,
Taylor

[1]: https://lore.kernel.org/git/patch-1.1-deb65805345-20221206T195811Z-avarab@gmail.com/
diff mbox series

Patch

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 43d47824dd3..1e95aa86b6c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -34,7 +34,7 @@  jobs:
           then
             enabled=no
           fi
-          echo "::set-output name=enabled::$enabled"
+          echo "enabled=$enabled" >>$GITHUB_OUTPUT
       - name: skip if the commit or tree was already tested
         id: skip-if-redundant
         uses: actions/github-script@v6