Skip to content

Commit

Permalink
Merge pull request #9 from jannekem/fix/output
Browse files Browse the repository at this point in the history
fix: switch to environment files in outputs
  • Loading branch information
jannekem authored Oct 27, 2022
2 parents 2ff3092 + da1c871 commit 24e5401
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 32 deletions.
57 changes: 36 additions & 21 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions dist/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def get_input(name):


def set_output(name, value):
print(f"::set-output name={name}::{_escape_data(value)}")
with open(os.getenv("GITHUB_OUTPUT"), "a") as env:
print(f"{name}={_escape_data(value)}", file=env)


def set_env(name, value):
Expand Down Expand Up @@ -56,7 +57,8 @@ def get_state(name):


def save_state(name, value):
print(f"::save-state name={name}::{_escape_data(value)}")
with open(os.getenv("GITHUB_STATE"), "a") as env:
print(f"{name}={_escape_data(value)}", file=env)


def _escape_data(value: str):
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"homepage": "https://github.com/jannekem/run-python-srcipt-action#readme",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"tmp": "^0.2.1"
},
Expand Down

0 comments on commit 24e5401

Please sign in to comment.