Skip to content

fix pipline for magick #25

fix pipline for magick

fix pipline for magick #25

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 # Для правильной работы git истории
- name: Update Arch and install dependencies
run: |
# Обновление системы и установка пакетов
pacman -Syu --noconfirm
pacman -S --noconfirm git imagemagick wget base-devel pngcrush optipng
convert --version
- name: Set up Git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Make scripts executable
run: chmod +x ./scripts/gen-readme-for-wlp.sh ./scripts/build-wallpaper-pages.sh
- name: Run script to generate READMEs
run: ./scripts/build-wallpaper-pages.sh
- name: Verify generated images
run: |
echo "Проверка сгенерированных изображений:"
find media/wlp-preview/ -name "*.png" -exec identify -verbose {} \; | head -n 20
echo "Всего сгенерировано: $(find media/wlp-preview/ -name "*.png" | wc -l) изображений"
- name: Add changes to Git stage
run: git add .
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local 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