Skip to content

Commit

Permalink
Replace set-output usage with GITHUB_OUTPUT (#252)
Browse files Browse the repository at this point in the history
* GitHub has deprecated set-output and now needs to add the content to the GITHUB_OUTPUT file

* Update tests too

* Fix tests and shell-format changes

* Revert yarn.lock changes
  • Loading branch information
amonshiz committed Oct 22, 2022
1 parent faf7859 commit 2fde6fc
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 113 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 2fde6fc

Please sign in to comment.