-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1009 Bytes
/
convertAllToWebp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Convert all pictures to Webp
on:
pull_request:
paths:
- '**.jpg'
- '**.png'
- '**.jpeg'
- '**.webp'
jobs:
convert_all_to_webp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install WEBP converter
run: |
sudo apt-get update && sudo apt install webp
sudo chmod ugo+x .github/workflows/toWebp
- name: Convert every picture to webp (and replace references)
run: |
sudo ./.github/workflows/toWebp public
sudo ./.github/workflows/toWebp src
- name: Compress pictures
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
ignorePaths: 'node_modules/**,build'
compressOnly: true
- name: Commit changes into PR
uses: stefanzweifel/git-auto-commit-action@v5