Skip to content

Commit 803c0e0

Browse files
authored
migrate set-output to the environment file (#1368)
1 parent a477f69 commit 803c0e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
id: set-matrix
2121
run: |
2222
import json
23+
import os
2324
go = [
2425
# Keep the most recent production release at the top
2526
'1.19',
@@ -55,7 +56,8 @@ jobs:
5556
'include': includes
5657
}
5758
output = json.dumps(matrix, separators=(',', ':'))
58-
print('::set-output name=matrix::{0}'.format(output))
59+
with open(os.environ["GITHUB_OUTPUT"], 'a', encoding="utf-8") as f:
60+
f.write('matrix={0}\n'.format(output))
5961
shell: python
6062
test:
6163
needs: list

0 commit comments

Comments
 (0)