forked from doocs/leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 822 Bytes
/
compress.yml
File metadata and controls
35 lines (30 loc) · 822 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: Compress
on:
push:
branches: [main]
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
jobs:
compress:
runs-on: ubuntu-latest
if: github.repository == 'doocs/leetcode'
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Compress Images
uses: calibreapp/image-actions@master
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- name: Commit Files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "[Automated] Optimize images" -a
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}