Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Wendel <[email protected]>
  • Loading branch information
KwadFan committed Nov 2, 2023
1 parent 7da947a commit a499b91
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/setup_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,21 @@ def main():
config_file, setup_group = args.config, args.group
if args.git:
try:
with open(config_file, 'r') as config:
data = yaml.safe_load(config)
# Check if group is present
if not setup_group in data:
raise Exception(
f"The given group '{setup_group}' doesn't exist!"
)
else:
print(data[setup_group])
with open(os.environ['GITHUB_OUTPUT'], 'a') as gitout:
print(data, file=gitout)
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as gitsum:
gitsum_header_msg(gitsum)
print(f'lorem ipsum', file=gitsum)

with open(os.environ['GITHUB_OUTPUT'], 'a') as gitout:
print(f"matrix=['foo/bar']", file=gitout)
except Exception as e:
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as gitsum:
gitsum_err_msg(e, gitsum)
Expand Down

0 comments on commit a499b91

Please sign in to comment.