Skip to content

Commit

Permalink
CI Test: Deprecating 'set-output' command (#3757)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdrll authored Jun 30, 2023
1 parent f01aaa6 commit 839ef35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->

- Update GitHub Action to display black output in the job summary (#3688)
- Deprecated `set-output` command in CI test to keep up to date with GitHub's
deprecation announcement (#3757)

### Documentation

Expand Down
8 changes: 7 additions & 1 deletion scripts/diff_shades_gha_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ def set_output(name: str, value: str) -> None:
print(f"[INFO]: setting '{name}' to '{value}'")
else:
print(f"[INFO]: setting '{name}' to [{len(value)} chars]")
print(f"::set-output name={name}::{value}")

# Originally the `set-output` workflow command was used here, now replaced
# by setting variables through the `GITHUB_OUTPUT` environment variable
# to stay up to date with GitHub's update.
if "GITHUB_OUTPUT" in os.environ:
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
print(f"{name}={value}", file=f)


def http_get(url: str, *, is_json: bool = True, **kwargs: Any) -> Any:
Expand Down

0 comments on commit 839ef35

Please sign in to comment.