This section only shows Author <actions@github.com> as an example and never states that the default commit author will be username <username@users.noreply.github.com>. I find this a bit misleading, maybe we should add an actual email address somewhere in the description?
As discussed in #123, clarified the default behavior of commit_author input option and extended the example to include guidance on preserving the original commit author.
- name: Get last commit message
id: last-commit
run: |
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT # Optional: if you want to preserve the commit author
- uses: stefanzweifel/git-auto-commit-action@vN
with:
commit_author: ${{ steps.last-commit.outputs.author }}
commit_message: ${{ steps.last-commit.outputs.message }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
Feel free to point out potential changes or improvements)
As discussed in #123, clarified the default behavior of
commit_author
input option and extended the example to include guidance on preserving the original commit author.Feel free to point out potential changes or improvements)