Skip to content

Compress images and add auto-compress workflow #3

Compress images and add auto-compress workflow

Compress images and add auto-compress workflow #3

name: Compress Images
on:
pull_request:
branches:
- gh-pages
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.gif"
push:
branches:
- gh-pages
jobs:
compress-images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Compress Images
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- name: Create New Pull Request
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v4
with:
title: Auto Compressed Images
branch-suffix: timestamp
commit-message: Auto Compressed Images
body: ${{ steps.calibre.outputs.markdown }}