chore: update workflows

This commit is contained in:
yanglbme 2021-11-04 09:41:41 +08:00
parent 47ebb4cc8c
commit fdf504190f
2 changed files with 6 additions and 5 deletions

View File

@ -18,16 +18,19 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Compress Images - name: Compress Images
uses: calibreapp/image-actions@master id: calibre
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 "action@github.com" git config --local user.email "action@github.com"
git config --local user.name "GitHub Action" 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 - name: Push Changes
uses: ad-m/github-push-action@master uses: ad-m/github-push-action@master
with: with:

View File

@ -14,9 +14,7 @@ jobs:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Prettify code - name: Prettify code
uses: creyD/prettier_action@v3.3 uses: creyD/prettier_action@v4.0
with: with:
prettier_options: --write **/*.{html,js,md,vue,less,css} prettier_options: --write **/*.{html,js,md,vue,less,css}
commit_message: "style: prettify code" commit_message: "style: prettify code"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}