mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
chore: update compress workflow
This commit is contained in:
parent
4c0b029430
commit
9d27b1a8e1
21
.github/workflows/compress.yml
vendored
21
.github/workflows/compress.yml
vendored
@ -1,13 +1,8 @@
|
|||||||
name: Compress
|
name: Compress images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
schedule:
|
||||||
branches: [main]
|
- cron: "0 0 * * 3"
|
||||||
paths:
|
|
||||||
- "**.jpg"
|
|
||||||
- "**.jpeg"
|
|
||||||
- "**.png"
|
|
||||||
- "**.webp"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -22,17 +17,19 @@ jobs:
|
|||||||
id: calibre
|
id: calibre
|
||||||
uses: calibreapp/image-actions@main
|
uses: calibreapp/image-actions@main
|
||||||
with:
|
with:
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
githubToken: ${{ secrets.ACTION_TOKEN }}
|
||||||
compressOnly: true
|
compressOnly: true
|
||||||
|
|
||||||
- name: Commit Files
|
- name: Commit Files
|
||||||
if: |
|
if: |
|
||||||
steps.calibre.outputs.markdown != ''
|
steps.calibre.outputs.markdown != ''
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "szuyanglb@outlook.com"
|
||||||
git config --local user.name "GitHub Action"
|
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.ACTION_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user