We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fe9982 commit 61ff2f1Copy full SHA for 61ff2f1
.github/workflows/compress.yml
@@ -0,0 +1,36 @@
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 "[email protected]"
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
36
+ github_token: ${{ secrets.GITHUB_TOKEN }}
0 commit comments