Continuous Integration

Github Action: Image Optimization Pipeline

Whenever your pull request contains image changes, this Github action will run and create a commit of optimized images.

Create a image-optimization.yml file under .github/workflows, and have the following content:

name: Compress Images

on:
  pull_request:
    paths:
      - '**.jpg'
      - '**.png'
      - '**.ico'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout pull request
        uses: actions/checkout@master
      - name: Optimize images
        uses: docker://calibreapp/github-image-actions
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Standard

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.