File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches :
66 - main
77
8+ permissions :
9+ contents : write
10+
811jobs :
912 update-readme :
1013 runs-on : ubuntu-latest
14+
1115 steps :
1216 - name : Checkout repository
13- uses : actions/checkout@v3
17+ uses : actions/checkout@v4
1418
1519 - name : Get new README content from URL
1620 run : |
17- curl -H "Authorization: Bearer ${{ secrets.README_URL_TOKEN }}" -o README.md ${{ secrets.README_URL }}
18-
21+ curl -H "Authorization: Bearer ${{ secrets.README_URL_TOKEN }}" -L - o README.md " ${{ secrets.README_URL }}"
22+
1923 - name : Commit and push updated README
2024 run : |
2125 git config --global user.name "github-actions"
2226 git config --global user.email "github-actions@github.com"
2327 git add README.md
28+
29+ if git diff --cached --quiet; then
30+ echo "No changes to commit"
31+ exit 0
32+ fi
33+
2434 git commit -m "Update README programmatically"
2535 git push
You can’t perform that action at this time.
0 commit comments