You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
829 B
36 lines
829 B
name: Compress
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "**.jpg"
|
|
- "**.jpeg"
|
|
- "**.png"
|
|
- "**.webp"
|
|
|
|
jobs:
|
|
compress:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'doocs/source-code-hunter'
|
|
steps:
|
|
- name: Checkout Branch
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Compress Images
|
|
uses: calibreapp/image-actions@main
|
|
with:
|
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
compressOnly: true
|
|
|
|
- name: Commit Files
|
|
run: |
|
|
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
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|