-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 1.01 KB
/
generate-readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Generate README with Previews
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
generate-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install pillow
- name: Generate README
run: python scripts/generate_readme.py
- name: Commit and push changes
env:
PAT: ${{ secrets.ACTIONS_PAT }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://${PAT}@github.com/${{ github.repository }}.git
git add README.md
git commit -m "Update README with wallpaper previews" || echo "No changes to commit"
git push origin HEAD:main