Merge pull request #107 from caspermeijn/bijwerken #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |