Skip to content

Update images

Update images #12

name: Update the README.md Gallery Preview
on:
push:
paths:
- 'Collection/**.jpg'
- 'Collection/**.png'
- 'Collection/**.jpeg'
- 'Collection/**.webp'
- 'generate-gallery.py'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run Gallery Script
run: python generate-gallery.py
- name: Commit and Push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add README.md
git diff --quiet && git diff --staged --quiet || (git commit -m "Auto-update gallery preview" && git push)