diff mbox series

CI: migrate away from deprecated "set-output" syntax

Message ID patch-1.1-deb65805345-20221206T195811Z-avarab@gmail.com (mailing list archive)
State Superseded
Headers show
Series CI: migrate away from deprecated "set-output" syntax | expand

Commit Message

Ævar Arnfjörð Bjarmason Dec. 6, 2022, 8 p.m. UTC
As noted in [1] and the warnings the CI itself is spewing echoing
outputs to stdout is deprecated, and they should be written to
"$GITHUB_OUTPUT" instead.

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

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

Along with my just-sent
https://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/
and Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/
this should make our CI warning free.

 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Victoria Dye Dec. 6, 2022, 8:50 p.m. UTC | #1
Ævar Arnfjörð Bjarmason wrote:
> As noted in [1] and the warnings the CI itself is spewing echoing
> outputs to stdout is deprecated, and they should be written to
> "$GITHUB_OUTPUT" instead.
> 
> 1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Interesting, I didn't realize this changed! The new syntax is certainly much
nicer to read.

> 
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> 
> Along with my just-sent
> https://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/
> and Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/
> this should make our CI warning free.
> 
>  .github/workflows/main.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Should this also be updated for 'l10n.yml'? There are two usages of
'::set-output' there as well.

> 
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
> index 9afacfa0b33..d1e16009b11 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

Looks good!

>        - name: skip if the commit or tree was already tested
>          id: skip-if-redundant
>          uses: actions/github-script@v6
Ævar Arnfjörð Bjarmason Dec. 6, 2022, 9:08 p.m. UTC | #2
On Tue, Dec 06 2022, Victoria Dye wrote:

> Ævar Arnfjörð Bjarmason wrote:
> [...]
>> 
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> ---
>> 
>> Along with my just-sent
>> https://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/
>> and Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/
>> this should make our CI warning free.
>> 
>>  .github/workflows/main.yml | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Should this also be updated for 'l10n.yml'? There are two usages of
> '::set-output' there as well.

Yes, I just missed that one. I'll fix that, but will wait a bit to see
if there's any other comments first. Thanks!
Taylor Blau Dec. 7, 2022, 12:56 a.m. UTC | #3
On Tue, Dec 06, 2022 at 10:08:36PM +0100, Ævar Arnfjörð Bjarmason wrote:
> > Should this also be updated for 'l10n.yml'? There are two usages of
> > '::set-output' there as well.
>
> Yes, I just missed that one. I'll fix that, but will wait a bit to see
> if there's any other comments first. Thanks!

No concerns from me. I noticed this warning when I was looking at all of
the CI builds a few weeks ago.

This transition looks obviously correct to me, and as long as we apply
it in the l10n workflow as Victoria mentions, this should be good to go.

Thanks,
Taylor
diff mbox series

Patch

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9afacfa0b33..d1e16009b11 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