Skip to content

Update generate-readme.yml #7

Update generate-readme.yml

Update generate-readme.yml #7

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