Skip to content

Commit

Permalink
Merge pull request #102 from vsoch/test-envar-files
Browse files Browse the repository at this point in the history
Testing to see if envar files environment variables are set (or not)
  • Loading branch information
vsoch authored Mar 14, 2024
2 parents 0969c26 + 8f0f9ee commit 8823918
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pull-request.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def set_env_and_output(name, value):
"""
for env_var in ("GITHUB_ENV", "GITHUB_OUTPUT"):
environment_file_path = os.environ.get(env_var)
if not environment_file_path:
print(f"Warning: {env_var} is unset, skipping.")
continue
print("Writing %s=%s to %s" % (name, value, env_var))

with open(environment_file_path, "a") as environment_file:
Expand Down

0 comments on commit 8823918

Please sign in to comment.