FossifyGallery/.github/workflows/image-minimizer.yml

35 lines
813 B
YAML
Raw Permalink Normal View History

2024-01-26 19:31:27 +01:00
name: Image Minimizer
on:
issue_comment:
types: [created, edited]
issues:
types: [opened, edited]
2024-11-17 18:12:38 +01:00
pull_request_target:
2024-01-26 19:31:27 +01:00
types: [opened, edited]
jobs:
try-minimize:
runs-on: ubuntu-latest
steps:
2024-07-24 12:41:54 +02:00
- uses: actions/checkout@v4
2024-11-17 19:05:09 +01:00
with:
token: ${{ secrets.FOSSIFYBOT_TOKEN }}
2024-01-26 19:31:27 +01:00
2024-07-24 12:41:54 +02:00
- uses: actions/setup-node@v4
2024-01-26 19:31:27 +01:00
with:
node-version: 16
- name: Install probe-image-size
run: npm i probe-image-size@7.2.3 --ignore-scripts
- name: Minimize simple images
2024-07-24 12:41:54 +02:00
uses: actions/github-script@v7
2024-01-26 19:31:27 +01:00
timeout-minutes: 3
with:
2024-11-17 18:49:40 +01:00
github-token: ${{ secrets.FOSSIFYBOT_TOKEN }}
2024-01-26 19:31:27 +01:00
script: |
const script = require('.github/workflows/image-minimizer.js');
await script({github, context});