From eb9d68a369c3fd63dbd45bd348c4f65202022bbf Mon Sep 17 00:00:00 2001 From: karlwebstersponge <19327709+ktasper@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:05:04 +0100 Subject: [PATCH 1/2] Fixed set-output deprecation --- .github/workflows/ci-cd.yml | 18 +++++++++--------- python/test/test_github_action.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 42749c4a..2080d466 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -389,16 +389,16 @@ jobs: run: | case "$OS" in ubuntu*) - echo "::set-output name=path-sep::/" - echo "::set-output name=pip-cache::~/.cache/pip" + echo "path-sep=/" >>$GITHUB_OUTPUT + echo "pip-cache=~/.cache/pip" >>$GITHUB_OUTPUT ;; macos*) - echo "::set-output name=path-sep::/" - echo "::set-output name=pip-cache::~/Library/Caches/pip" + echo "path-sep=/" >>$GITHUB_OUTPUT + echo "pip-cache=~/Library/Caches/pip" >>$GITHUB_OUTPUT ;; windows*) - echo "::set-output name=path-sep::\\" - echo "::set-output name=pip-cache::~\\AppData\\Local\\pip\\Cache" + echo "path-sep=\\" >>$GITHUB_OUTPUT + echo "pip-cache=~\\AppData\\Local\\pip\\Cache" >>$GITHUB_OUTPUT ;; esac shell: bash @@ -592,8 +592,8 @@ jobs: run: | image=$(grep -A 10 "^runs:" action.yml | grep -E "^\s+image:\s" | sed -E -e "s/^\s+image:\s*'//" -e "s/docker:\/\///" -e "s/'\s*$//") version=$(cut -d : -f 2 <<< "$image") - echo "::set-output name=image::$image" - echo "::set-output name=version::$version" + echo "image=$image" >>$GITHUB_OUTPUT + echo "version=$version" >>$GITHUB_OUTPUT shell: bash - name: Check action image existence @@ -603,7 +603,7 @@ jobs: run: | if docker manifest inspect '${{ steps.action.outputs.image }}' then - echo "::set-output name=exists::true" + echo "exists=true" >>$GITHUB_OUTPUT fi shell: bash diff --git a/python/test/test_github_action.py b/python/test/test_github_action.py index d8bb7d0a..f7357452 100644 --- a/python/test/test_github_action.py +++ b/python/test/test_github_action.py @@ -231,7 +231,7 @@ def test_add_output(self): gha.add_to_output('var2', 'val4') # if there is no env file, the output is set via command - with gh_action_command_test(self, '::set-output name=varname::varval') as gha: + with gh_action_command_test(self, 'varname=varval >>$GITHUB_OUTPUT') as gha: gha.add_to_output('varname', 'varval') def test_add_job_summary(self): From 7c3244c830b75348c4eb8a05aa31e04296ffe333 Mon Sep 17 00:00:00 2001 From: karlwebstersponge <19327709+ktasper@users.noreply.github.com> Date: Thu, 20 Oct 2022 16:33:26 +0100 Subject: [PATCH 2/2] Undo my change to the test. --- python/test/test_github_action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/test/test_github_action.py b/python/test/test_github_action.py index f7357452..d8bb7d0a 100644 --- a/python/test/test_github_action.py +++ b/python/test/test_github_action.py @@ -231,7 +231,7 @@ def test_add_output(self): gha.add_to_output('var2', 'val4') # if there is no env file, the output is set via command - with gh_action_command_test(self, 'varname=varval >>$GITHUB_OUTPUT') as gha: + with gh_action_command_test(self, '::set-output name=varname::varval') as gha: gha.add_to_output('varname', 'varval') def test_add_job_summary(self):