From 7545c4923a325477c922b0fd48a17a6d18c06256 Mon Sep 17 00:00:00 2001 From: Andrew Monshizadeh Date: Thu, 20 Oct 2022 19:37:47 -0400 Subject: [PATCH] GitHub has deprecated set-output and now needs to add the content to the GITHUB_OUTPUT file --- README.md | 2 +- entrypoint.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 665924b..3bb908c 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,7 @@ The steps in your workflow might look like this: - name: Get last commit message id: last-commit-message run: | - echo "::set-output name=msg::$(git log -1 --pretty=%s)" + echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT - uses: stefanzweifel/git-auto-commit-action@v4 with: diff --git a/entrypoint.sh b/entrypoint.sh index e34e72e..026b879 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,7 +11,7 @@ _main() { if _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then - echo "::set-output name=changes_detected::true"; + echo "changes_detected=true" >> $GITHUB_OUTPUT; _switch_to_branch @@ -24,7 +24,7 @@ _main() { _push_to_github else - echo "::set-output name=changes_detected::false"; + echo "changes_detected=false" >> $GITHUB_OUTPUT; echo "Working tree clean. Nothing to commit."; fi @@ -101,7 +101,7 @@ _local_commit() { --author="$INPUT_COMMIT_AUTHOR" \ ${INPUT_COMMIT_OPTIONS:+"${INPUT_COMMIT_OPTIONS_ARRAY[@]}"}; - echo "::set-output name=commit_hash::$(git rev-parse HEAD)"; + echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT; } _tag_commit() {