Skip to content

Commit 2fde6fc

Browse files
authored
Replace set-output usage with GITHUB_OUTPUT (#252)
* 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
1 parent faf7859 commit 2fde6fc

3 files changed

Lines changed: 154 additions & 113 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ The steps in your workflow might look like this:
345345
- name: Get last commit message
346346
id: last-commit-message
347347
run: |
348-
echo "::set-output name=msg::$(git log -1 --pretty=%s)"
348+
echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
349349
350350
- uses: stefanzweifel/git-auto-commit-action@v4
351351
with:

entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ _main() {
1111

1212
if _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then
1313

14-
echo "::set-output name=changes_detected::true";
14+
echo "changes_detected=true" >> $GITHUB_OUTPUT;
1515

1616
_switch_to_branch
1717

@@ -24,7 +24,7 @@ _main() {
2424
_push_to_github
2525
else
2626

27-
echo "::set-output name=changes_detected::false";
27+
echo "changes_detected=false" >> $GITHUB_OUTPUT;
2828

2929
echo "Working tree clean. Nothing to commit.";
3030
fi
@@ -101,7 +101,7 @@ _local_commit() {
101101
--author="$INPUT_COMMIT_AUTHOR" \
102102
${INPUT_COMMIT_OPTIONS:+"${INPUT_COMMIT_OPTIONS_ARRAY[@]}"};
103103

104-
echo "::set-output name=commit_hash::$(git rev-parse HEAD)";
104+
echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT;
105105
}
106106

107107
_tag_commit() {

0 commit comments

Comments
 (0)