Skip to content

Commit

Permalink
chore: update compress workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Aug 9, 2022
1 parent 4c0b029 commit 9d27b1a
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/compress.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Compress
name: Compress images

on:
push:
branches: [main]
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
schedule:
- cron: "0 0 * * 3"
workflow_dispatch:

jobs:
Expand All @@ -22,17 +17,19 @@ jobs:
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.ACTION_TOKEN }}
compressOnly: true

- name: Commit Files
if: |
steps.calibre.outputs.markdown != ''
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "szuyanglb@outlook.com"
git config --local user.name "yanglbme"
git commit -m "chore: auto compress images" -a
- name: Push Changes
if: |
steps.calibre.outputs.markdown != ''
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.ACTION_TOKEN }}

0 comments on commit 9d27b1a

Please sign in to comment.