Skip to content

Commit 74beba7

Browse files
yml updated
1 parent e744151 commit 74beba7

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/update-readme.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: write
10+
811
jobs:
9-
generate-readme:
12+
build:
1013
runs-on: ubuntu-latest
1114

1215
steps:
13-
# Checkout the repo
14-
- name: Checkout repository
16+
- name: Checkout
1517
uses: actions/checkout@v3
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
1620

17-
# Set up Node.js
18-
- name: Setup Node.js
21+
- name: Setup Node
1922
uses: actions/setup-node@v3
2023
with:
21-
node-version: '18'
24+
node-version: 18
2225

23-
# Run your README generator
24-
- name: Run generateReadme.js
26+
- name: Run README Generator
2527
run: node generateReadme.js
2628

27-
# Commit the updated README
28-
- name: Commit changes
29+
- name: Commit and Push changes
2930
run: |
3031
git config --local user.name "github-actions[bot]"
3132
git config --local user.email "github-actions[bot]@users.noreply.github.com"
3233
git add README.md
33-
git diff --quiet || git commit -m "chore: update README.md"
34+
git commit -m "Auto-update README [skip ci]" || echo "No changes to commit"
3435
git push

0 commit comments

Comments
 (0)