Skip to content

Commit 711d5ca

Browse files
committed
fix(ci): add guard for missing GITHUB_OUTPUT variable
Consistent with existing environ checks for RELEASE_TAG and TARGET. https://claude.ai/code/session_01DNUdELQ1xnVwtZbhdz3K9A
1 parent 8528f35 commit 711d5ca

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ci/github-actions/release-type.py3

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ def dict_path(data, head: str, *tail: str):
1919
if not tail: return value
2020
return dict_path(value, *tail)
2121

22+
github_output = environ.get('GITHUB_OUTPUT', None)
23+
24+
if not github_output:
25+
print('::error ::Environment variable GITHUB_OUTPUT is required but missing')
26+
exit(1)
27+
2228
def set_output(name: str, value: str):
23-
with open(environ['GITHUB_OUTPUT'], 'a') as output_file:
29+
with open(github_output, 'a') as output_file:
2430
print(f'{name}={value}', file=output_file)
2531

2632
with open('Cargo.toml') as cargo_toml:

0 commit comments

Comments
 (0)