-
-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (29 loc) · 829 Bytes
/
convert-webp.yml
File metadata and controls
35 lines (29 loc) · 829 Bytes
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
33
34
35
name: Convert Images to WebP
on:
workflow_dispatch:
jobs:
convert:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run WebP conversion script
run: node scripts/convert-webp.js
- name: Commit changes
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add artworks/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: convert artworks to webp format"
git push
fi