diff --git a/action.yml b/action.yml index 6187c79c..e3995282 100644 --- a/action.yml +++ b/action.yml @@ -164,11 +164,12 @@ runs: - name: Commit and Push Changes if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action != 'closed' run: | + git config --global user.name "UltralyticsAssistant" + git config --global user.email "web@ultralytics.com" + git pull --rebase # pull the latest changes from the remote branch and rebase to avoid merge commit git add . git reset HEAD -- .github/workflows/ # workflow changes are not permitted with default token if ! git diff --staged --quiet; then - git config --global user.name "UltralyticsAssistant" - git config --global user.email "web@ultralytics.com" git commit -m "Auto-format by https://ultralytics.com/actions" git push else