chore: update workflow

pull/132/head
yanglbme 2 years ago
parent 040e30d274
commit d0481a3b6d

@ -1,13 +1,9 @@
name: Compress name: Compress
on: on:
push: schedule:
branches: [main] - cron: "0 0 * * 3"
paths: workflow_dispatch:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
jobs: jobs:
compress: compress:
@ -18,18 +14,23 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Compress Images - name: Compress Images
id: calibre
uses: calibreapp/image-actions@main uses: calibreapp/image-actions@main
with: with:
githubToken: ${{ secrets.GITHUB_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true compressOnly: true
- name: Commit Files - name: Commit Files
if: |
steps.calibre.outputs.markdown != ''
run: | run: |
git config --local user.email "szuyanglb@outlook.com" git config --local user.email "szuyanglb@outlook.com"
git config --local user.name "yanglbme" git config --local user.name "yanglbme"
git commit -m "chore: auto compress images" -a git commit -m "chore: auto compress images" -a
- name: Push Changes - name: Push Changes
if: |
steps.calibre.outputs.markdown != ''
uses: ad-m/github-push-action@master uses: ad-m/github-push-action@master
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
Loading…
Cancel
Save