[PATCH v3] CI: migrate away from deprecated "set-output" syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
Range-diff against v2:
1:  4e7db0db3be ! 1:  0519cc1105a CI: migrate away from deprecated "set-output" syntax
    @@ .github/workflows/l10n.yml: jobs:
                fi
     -          echo "::set-output name=base::$base"
     -          echo "::set-output name=head::$head"
    -+          cat >>$GITHUB_OUTPUT <<-EOF
    -+          base=$base
    -+          head=$head
    -+          EOF
    ++          echo "base=$base" >>$GITHUB_OUTPUT
    ++          echo "head=$head" >>$GITHUB_OUTPUT
            - name: Run partial clone
              run: |
                git -c init.defaultBranch=master init --bare .

 .github/workflows/l10n.yml | 4 ++--
 .github/workflows/main.yml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml
index 27f72f0ff34..2915c595b4f 100644
--- a/.github/workflows/l10n.yml
+++ b/.github/workflows/l10n.yml
@@ -23,8 +23,8 @@ jobs:
             base=${{ github.event.before }}
             head=${{ github.event.after }}
           fi
-          echo "::set-output name=base::$base"
-          echo "::set-output name=head::$head"
+          echo "base=$base" >>$GITHUB_OUTPUT
+          echo "head=$head" >>$GITHUB_OUTPUT
       - name: Run partial clone
         run: |
           git -c init.defaultBranch=master init --bare .
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
-- 
2.39.0.rc2.1019.gce04d262ea9




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux