File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Compress
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ paths :
7
+ - " **.jpg"
8
+ - " **.jpeg"
9
+ - " **.png"
10
+ - " **.webp"
11
+ workflow_dispatch :
12
+
13
+ jobs :
14
+ compress :
15
+ runs-on : ubuntu-latest
16
+ if : github.repository == 'doocs/advanced-java'
17
+ steps :
18
+ - name : Checkout Branch
19
+ uses : actions/checkout@v2
20
+
21
+ - name : Compress Images
22
+ uses : calibreapp/image-actions@master
23
+ with :
24
+ githubToken : ${{ secrets.GITHUB_TOKEN }}
25
+ compressOnly : true
26
+
27
+ - name : Commit Files
28
+ run : |
29
+ git config --local user.email "action@github.com"
30
+ git config --local user.name "GitHub Action"
31
+ git commit -m "docs: optimize images" -a
32
+
33
+ - name : Push Changes
34
+ uses : ad-m/github-push-action@master
35
+ with :
36
+ github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments