File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,11 +97,21 @@ jobs:
9797 ' README.md > README.tmp && mv README.tmp README.md
9898
9999 # 7 – commit & push the updated README back
100- - name : Commit updated README
101- uses : stefanzweifel/git-auto-commit-action@v4
102- with :
103- commit_message : chore: update README with latest AOAI test results
104- file_pattern : README.md
105- author_name : GitHub Actions
106- author_email : actions@github.com
107- branch : ${{ github.ref_name }}
100+ - name : Commit and push updated README
101+ shell : bash
102+ env :
103+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104+ run : |
105+ # ensure we can push back to the repo
106+ git config user.name "github-actions[bot]"
107+ git config user.email "github-actions[bot]@users.noreply.github.com"
108+ git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
109+
110+ # only commit if there are changes
111+ if git diff --quiet README.md; then
112+ echo "No README changes to commit."
113+ else
114+ git add README.md
115+ git commit -m "chore: update README with latest AOAI test results"
116+ git push origin ${{ github.ref_name }}
117+ fi
You can’t perform that action at this time.
0 commit comments