File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 48
48
raise
49
49
50
50
51
+ def set_output (name , value ):
52
+ if "GITHUB_OUTPUT" in os .environ :
53
+ with open (os .environ ["GITHUB_OUTPUT" ], "at" ) as f :
54
+ print (f"{ name } ={ value } " , file = f )
55
+ else :
56
+ print ("Would set GitHub actions output {name} to '{value}'" )
57
+
58
+
51
59
def set_boards_to_build (build_all ):
52
60
# Get boards in json format
53
61
boards_info_json = build_board_info .get_board_mapping ()
@@ -161,7 +169,7 @@ def set_boards_to_build(build_all):
161
169
162
170
# Set the step outputs for each architecture
163
171
for arch in arch_to_boards :
164
- print ( "::set-output name= boards-" + arch + "::" + json .dumps (sorted (arch_to_boards [arch ])))
172
+ set_output ( f" boards-{ arch } " , json .dumps (sorted (arch_to_boards [arch ])))
165
173
166
174
167
175
def set_docs_to_build (build_all ):
@@ -177,7 +185,7 @@ def set_docs_to_build(build_all):
177
185
178
186
# Set the step outputs
179
187
print ("Building docs:" , doc_match )
180
- print ( "::set-output name= build-doc::" + str ( doc_match ) )
188
+ set_output ( f" build-doc" , doc_match )
181
189
182
190
183
191
def check_changed_files ():
You can’t perform that action at this time.
0 commit comments