parent
9a554e968f
commit
e562c4b589
@ -1,17 +0,0 @@
|
|||||||
name: Merge Branch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [imgbot]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
merge-branch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: everlytic/branch-merge@1.1.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ github.token }}
|
|
||||||
source_ref: ${{ github.ref }}
|
|
||||||
target_branch: main
|
|
||||||
commit_message_template: "[Automated] Merged {source_ref} into {target_branch}"
|
|
@ -0,0 +1,35 @@
|
|||||||
|
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@master
|
||||||
|
with:
|
||||||
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
compressOnly: true
|
||||||
|
|
||||||
|
- name: Commit Files
|
||||||
|
run: |
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
git commit -m "[Automated] Optimize images" -a
|
||||||
|
|
||||||
|
- name: Push Changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in new issue