CI Test: Deprecating 'set-output' command (#3757)

This commit is contained in:
rdrll 2023-06-30 07:07:42 -07:00 committed by GitHub
parent f01aaa63a0
commit 839ef35dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -70,6 +70,8 @@
<!-- For example, Docker, GitHub Actions, pre-commit, editors --> <!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Update GitHub Action to display black output in the job summary (#3688) - 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 ### Documentation

View File

@ -52,7 +52,13 @@ def set_output(name: str, value: str) -> None:
print(f"[INFO]: setting '{name}' to '{value}'") print(f"[INFO]: setting '{name}' to '{value}'")
else: else:
print(f"[INFO]: setting '{name}' to [{len(value)} chars]") 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: def http_get(url: str, *, is_json: bool = True, **kwargs: Any) -> Any: