From fdf504190f0f03d1e95caa8b0af42bc766554dc5 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Thu, 4 Nov 2021 09:41:41 +0800 Subject: [PATCH] chore: update workflows --- .github/workflows/compress.yml | 7 +++++-- .github/workflows/prettier.yml | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml index f83e77d..2685481 100644 --- a/.github/workflows/compress.yml +++ b/.github/workflows/compress.yml @@ -18,16 +18,19 @@ jobs: uses: actions/checkout@v2 - name: Compress Images - uses: calibreapp/image-actions@master + id: calibre + uses: calibreapp/image-actions@main with: githubToken: ${{ secrets.GITHUB_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 commit -m "[Automated] Optimize images" -a + git commit -m "chore: auto compress images" -a - name: Push Changes uses: ad-m/github-push-action@master with: diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 23d6bfa..e1eff59 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -14,9 +14,7 @@ jobs: ref: ${{ github.head_ref }} - name: Prettify code - uses: creyD/prettier_action@v3.3 + uses: creyD/prettier_action@v4.0 with: prettier_options: --write **/*.{html,js,md,vue,less,css} commit_message: "style: prettify code" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}