2022-02-11 20:54:12 +01:00
|
|
|
name: Image Minimizer
|
|
|
|
|
|
|
|
on:
|
|
|
|
issue_comment:
|
|
|
|
types: [created, edited]
|
|
|
|
issues:
|
|
|
|
types: [opened, edited]
|
2023-07-15 02:01:11 +02:00
|
|
|
pull_request:
|
|
|
|
types: [opened, edited]
|
2022-02-11 20:54:12 +01:00
|
|
|
|
2022-07-03 19:38:51 +02:00
|
|
|
permissions:
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
|
|
|
|
2022-02-11 20:54:12 +01:00
|
|
|
jobs:
|
|
|
|
try-minimize:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-04-14 21:43:56 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-11 20:54:12 +01:00
|
|
|
|
2022-04-14 21:43:56 +02:00
|
|
|
- uses: actions/setup-node@v3
|
2022-02-11 20:54:12 +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
|
2022-04-14 21:43:56 +02:00
|
|
|
uses: actions/github-script@v6
|
2022-02-11 20:54:12 +01:00
|
|
|
timeout-minutes: 3
|
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
const script = require('.github/workflows/image-minimizer.js');
|
|
|
|
await script({github, context});
|