Skip to content

Merge pull request #107 from caspermeijn/bijwerken #68

Merge pull request #107 from caspermeijn/bijwerken

Merge pull request #107 from caspermeijn/bijwerken #68

# 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@v4
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@v6
with:
commit-message: Optimize images
title: Optimize images
body: Run jpegoptim to optimize the images
branch: optimize-images
delete-branch: true