From 9d27b1a8e1a3d75983cfe96880fd903454026553 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Tue, 9 Aug 2022 21:26:50 +0800 Subject: [PATCH] chore: update compress workflow --- .github/workflows/compress.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml index ce559d0..a6d22f6 100644 --- a/.github/workflows/compress.yml +++ b/.github/workflows/compress.yml @@ -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: @@ -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 }}