[PATCH 2/2] ci: update to new API for step outputs in GHA

David Marchand david.marchand at redhat.com
Wed Oct 12 18:29:42 CEST 2022


GitHub actions deprecated use of set-output, replaced with
GITHUB_OUTPUT.

Note: we still have some warnings, as of today, because of
actions/cache at v3 which did not migrate yet.

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 .github/workflows/build.yml | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 187fdef306..b32758ff6f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -86,12 +86,9 @@ jobs:
     - name: Generate cache keys
       id: get_ref_keys
       run: |
-        echo -n '::set-output name=ccache::'
-        echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
-        echo -n '::set-output name=libabigail::'
-        echo 'libabigail-${{ matrix.config.os }}'
-        echo -n '::set-output name=abi::'
-        echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
+        echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
+        echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
+        echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
       uses: actions/cache at v3
       with:
@@ -177,8 +174,7 @@ jobs:
     - name: Generate various keys
       id: get_keys
       run: |
-        echo -n '::set-output name=image::'
-        echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
+        echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
       uses: actions/cache at v3
@@ -239,12 +235,9 @@ jobs:
     - name: Generate various keys
       id: get_keys
       run: |
-        echo -n '::set-output name=ccache::'
-        echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W)
-        echo -n '::set-output name=image::'
-        echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d)
-        echo -n '::set-output name=logs::'
-        echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':'
+        echo 'ccache=ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
+        echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
+        echo 'logs=meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' >> $GITHUB_OUTPUT
     - name: Retrieve image cache
       id: image_cache
       uses: actions/cache at v3
-- 
2.37.3



More information about the dev mailing list