Skip to content

Commit

Permalink
Adding in forcing of pushing the locally created commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jadesym committed Nov 17, 2022
1 parent f6385df commit 4ea0c79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The commit hash of the commit that was reverted.
if: always() && (needs.tests.result == 'failure')
steps:
- name: Automatic Commit Revert
uses: 'tofu-apis/[email protected].35'
uses: 'tofu-apis/[email protected].36'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
is-push-enabled: 'true'
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ runs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automatic Revert Commit for Commit Hash [${{ github.sha }}]
# Use amend with no edit but don't force since we know we generated a
# new auto revert commit that hasn't been submitted to the repo yet.
# This is effectively a no-op but is needed for git-auto-commit-action
# to force push the existing local commit that we have just created.
commit_options: '--amend --no-edit'
commit_user_name: ${{ inputs.commit-username }}
commit_user_email: ${{ inputs.commit-email }}
- name: Set commit hash outputs
Expand Down

0 comments on commit 4ea0c79

Please sign in to comment.