Skip to content

Merge pull request #96 from caspermeijn/optimize-images #58

Merge pull request #96 from caspermeijn/optimize-images

Merge pull request #96 from caspermeijn/optimize-images #58

# Copyright (C) 2020 Casper Meijn <casper@meijn.net>
#
# SPDX-License-Identifier: CC0-1.0
name: Optimize images
on:
push:
branches:
- main
- master
jobs:
optimize-images:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install image tools
run: |
sudo apt-get -y install jpegoptim
- name: Run jpegoptim to optimize
run: |
find -name *.jpg -exec jpegoptim --strip-all --max=85 --threshold=1 {} \;
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Optimize images
title: Optimize images
body: Run jpegoptim to optimize the images
branch: optimize-images
delete-branch: true