Skip to content

Commit 5238d43

Browse files
committed
ci/scripts/generate_job_matrix: 'set-output' is deprecated
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
1 parent 9044f07 commit 5238d43

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/scripts/generate_job_matrix.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
#
1818
# SPDX-License-Identifier: Apache-2.0
1919

20+
from os import environ
21+
from sys import argv as sys_argv, exit as sys_exit
2022
from fpgaperf import get_combinations, get_projects, get_project, toolchains
21-
import sys
2223

23-
if len(sys.argv) < 2:
24-
print("Usage {} <tool>".format(sys.argv[0]))
25-
sys.exit(1)
24+
if len(sys_argv) < 2:
25+
print("Usage {} <tool>".format(sys_argv[0]))
26+
sys_exit(1)
2627

27-
tools = sys.argv[1:]
28+
tools = sys_argv[1:]
2829

2930
all_toolchains = "all" in tools
3031

@@ -54,4 +55,6 @@
5455
)
5556

5657
matrices = {tool.replace('-', '_'): content for tool, content in jobs.items()}
57-
print(f"::set-output name=matrices::{matrices}")
58+
59+
with open(environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gho:
60+
gho.write(f"matrices={matrices!s}\n")

0 commit comments

Comments
 (0)