heed github warning, and use output file instead of set-output command; also, fix freestanding

This commit is contained in:
Yves Delley
2024-11-12 21:29:42 +01:00
parent f4c8e901ac
commit 01f44c66fa
2 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
import argparse
import json
import os
import random
import typing
from types import SimpleNamespace
@@ -157,8 +158,14 @@ def main():
json_data = [e.as_json() for e in data]
output_file = os.environ.get("GITHUB_OUTPUT")
if not args.suppress_output:
print(f"::set-output name=matrix::{json.dumps(json_data)}")
if output_file:
print(f"Writing outputs to {output_file}")
with open(output_file, "wt") as fh:
fh.write(f"matrix={json.dumps(json_data)}")
else:
print("No output file received!")
for dbg in args.debug:
match dbg: