From 61ca9b7a632b4d87f1de16efbed9e135c1bc9d98 Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Mon, 7 Nov 2022 19:13:26 +0900 Subject: [PATCH 1/2] migrate set-output to the environment file see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ GitHub Actions: Deprecating save-state and set-output commands --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b558eba28..9b2c3d041 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,7 @@ jobs: id: set-matrix run: | import json + import os go = [ # Keep the most recent production release at the top '1.19', @@ -55,7 +56,8 @@ jobs: 'include': includes } output = json.dumps(matrix, separators=(',', ':')) - print('::set-output name=matrix::{0}'.format(output)) + with open(os.environ["GITHUB_OUTPUT"], 'a', encoding="utf-8") as f: + f.write('matrix={0}'.format(output)) shell: python test: needs: list From eb1ec45bde4732a8e4cdfceb7d8db4c7f8b565fd Mon Sep 17 00:00:00 2001 From: ICHINOSE Shogo Date: Mon, 7 Nov 2022 20:55:21 +0900 Subject: [PATCH 2/2] add '\n' --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b2c3d041..703203258 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: } output = json.dumps(matrix, separators=(',', ':')) with open(os.environ["GITHUB_OUTPUT"], 'a', encoding="utf-8") as f: - f.write('matrix={0}'.format(output)) + f.write('matrix={0}\n'.format(output)) shell: python test: needs: list