Skip to content

Commit

Permalink
Replace deprecated set-output with GITHUB_OUTPUT method - Take 2 (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Austin <vidplace7@gmail.com>
  • Loading branch information
jesserockz and vidplace7 authored Jan 9, 2023
1 parent 63334f7 commit 0070bcf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 8 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ runs:
shell: bash
id: build-step
run: |-
docker run --rm --platform ${{ inputs.platform }} \
--workdir /github/workspace -v "$(pwd)":"/github/workspace" \
-e INPUT_YAML_FILE -e HOME -e GITHUB_JOB -e GITHUB_REF \
-e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER \
-e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR \
docker run --rm \
--platform ${{ inputs.platform }} \
--workdir /github/workspace \
-v "$(pwd)":"/github/workspace" -v "$HOME:$HOME" \
-e INPUT_YAML_FILE -e HOME \
-e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY \
-e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER \
-e GITHUB_ACTOR -e GITHUB_OUTPUT \
-e GITHUB_ACTIONS=true -e CI=true \
esphome:${{ inputs.version }} \
${{ inputs.yaml_file }}
Expand Down
6 changes: 4 additions & 2 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
version = version.decode("utf-8")
print(version)
version = version.split(" ")[1]
print(f"::set-output name=esphome-version::{version}")
with open(os.environ["GITHUB_OUTPUT"], "a") as github_output:
print(f"esphome-version={version}", file=github_output)
print("::endgroup::")

print("::group::Get config")
Expand All @@ -68,7 +69,8 @@

name += f"-{platform}"

print(f"::set-output name=name::{name}")
with open(os.environ["GITHUB_OUTPUT"], "a") as github_output:
print(f"name={name}", file=github_output)
print("::endgroup::")

file_base = Path(name)
Expand Down

0 comments on commit 0070bcf

Please sign in to comment.