diff --git a/.github/workflows/table_of_contents.yml b/.github/workflows/table_of_contents.yml index faeb421dd67..eb827cd9065 100644 --- a/.github/workflows/table_of_contents.yml +++ b/.github/workflows/table_of_contents.yml @@ -67,13 +67,8 @@ jobs: fi # Step 7 - Commit and Push generated Table Of Contents files - - name: Commit and Push Changes - if: steps.check_changes.outputs.has_changes == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global user.name "${{ github.actor }}" - git config --global user.email "${{ github.actor }}@users.noreply.github.com" - git add table-of-contents-files/* - git commit -m "Autogenerate table of contents files from GitHub action - $(date '+%Y-%m-%d %H:%M:%S')" - git push origin HEAD:update_table_of_contents \ No newline at end of file + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Autogenerate table of contents files from GitHub action - $(date '+%Y-%m-%d %H:%M:%S')" + branch: update_table_of_contents + file_pattern: 'table-of-contents-files/*'