mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-24 05:27:59 +01:00
34 lines
813 B
YAML
34 lines
813 B
YAML
name: Image Minimizer
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created, edited]
|
|
issues:
|
|
types: [opened, edited]
|
|
pull_request_target:
|
|
types: [opened, edited]
|
|
|
|
jobs:
|
|
try-minimize:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.FOSSIFYBOT_TOKEN }}
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Install probe-image-size
|
|
run: npm i probe-image-size@7.2.3 --ignore-scripts
|
|
|
|
- name: Minimize simple images
|
|
uses: actions/github-script@v7
|
|
timeout-minutes: 3
|
|
with:
|
|
github-token: ${{ secrets.FOSSIFYBOT_TOKEN }}
|
|
script: |
|
|
const script = require('.github/workflows/image-minimizer.js');
|
|
await script({github, context});
|