Skip to content

Commit 60b65eb

Browse files
committed
ci: oneshot-test: replace deprecated set-output command
Have the "Generate Matrix" step store its output (the matrix in JSON representation) by appending the corresponding entry to the `GITHUB_OUTPUT` environment file instead of using `set-output` command, which triggers a deprecation warning.
1 parent 17f46ee commit 60b65eb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/oneshot-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ jobs:
113113
114114
pprint.pprint(matrix)
115115
116-
# Outputs are set by printing special ::
117-
print("::set-output name=matrix::", json.dumps(matrix), sep="")
118-
116+
# Outputs are set by appending a {name}={value} line to the
117+
# environment file pointed to by GITHUB_OUTPUT environment variable.
118+
with open(os.environ['GITHUB_OUTPUT'], 'a') as fp:
119+
fp.write("matrix=")
120+
json.dump(matrix, fp)
121+
fp.write("\n")
119122
120123
test:
121124
permissions:

0 commit comments

Comments
 (0)