File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 traffic :
2121 runs-on : ubuntu-latest
2222 permissions :
23- # Needed by add-and-commit to push the CSV files to the `traffic` branch.
23+ # Needed to push the CSV files to the `traffic` branch.
2424 contents : write
2525 steps :
2626 - name : ' Checkout traffic branch'
3434 TRAFFIC_ACTION_TOKEN : ${{ secrets.TRAFFIC_ACTION_TOKEN }}
3535
3636 - name : ' Commit traffic data'
37- uses : EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 # v10.0.0
38- with :
39- message : ' chore: update repository traffic stats'
40- add : ' ./traffic/*'
41- # Commits to the dedicated `traffic` branch.
42- new_branch : ' traffic'
37+ run : |
38+ git config user.name 'github-actions[bot]'
39+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
40+ git add ./traffic/
41+ if git diff --cached --quiet; then
42+ echo 'No traffic changes to commit.'
43+ exit 0
44+ fi
45+ git commit -m 'chore: update repository traffic stats'
46+ git push origin HEAD:traffic
You can’t perform that action at this time.
0 commit comments