Skip to content

Compress images and add auto-compress workflow #2

Compress images and add auto-compress workflow

Compress images and add auto-compress workflow #2

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: Add comment to PR
if: steps.calibre.outputs.markdown != ''
uses: mshick/add-pr-comment@v2
with:
message: ${{ steps.calibre.outputs.markdown }}