Skip to content

tmp

tmp #37

name: Generate README previews
on:
push:
branches:
- main
jobs:
generate-readmes:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
path: /repo
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git imagemagick bc pngcrush optipng
convert --version
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global --add safe.directory /repo
- name: Make scripts executable
run: chmod +x /repo/scripts/*.sh
- name: Run generation script
run: |
cd /repo
REPO_ROOT="/repo" ./scripts/build-wallpaper-pages.sh
- name: Add changes to Git
run: |
cd /repo
git add .
- name: Commit changes
run: |
cd /repo
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit -m "Auto-generate wallpaper previews [skip ci]" --allow-empty
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
force_with_lease: true