Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix variable name for GitHub output #444

Merged
merged 2 commits into from Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -128,6 +128,8 @@ jobs:
- test
- docs
- pre-commit
- check_local_actions
- generate-changelog
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
4 changes: 2 additions & 2 deletions jupyter_releaser/util.py
Expand Up @@ -397,8 +397,8 @@ def latest_draft_release(gh, branch=None):
def actions_output(name, value):
"""Handle setting an action output on GitHub"""
log(f"\n\nSetting output {name}={value}")
if "GITHUB_ENV" in os.environ:
with open("GITHUB_ENV", "a") as fid:
if "GITHUB_OUTPUT" in os.environ:
with open("GITHUB_OUTPUT", "a") as fid:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should GITHUB_OUTPUT be a file, or an environment variable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hitting this issue: jupyter/notebook#6579 (comment)

Maybe it should be something like the following:

Suggested change
with open("GITHUB_OUTPUT", "a") as fid:
with open(os.environ["GITHUB_OUTPUT"], "a") as fid:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Continuing in #451

fid.write(f"{name}={value}\n")


Expand Down