mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 19:04:27 +02:00
heed github warning, and use output file instead of set-output command; also, fix freestanding
This commit is contained in:
9
.github/generate-job-matrix.py
vendored
9
.github/generate-job-matrix.py
vendored
@@ -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:
|
||||
|
Reference in New Issue
Block a user