mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-16 14:54:57 +00:00
a1f1acfbf9
This reduces the attack surface if the workflows are ever compromised.
34 lines
696 B
YAML
34 lines
696 B
YAML
name: Image Minimizer
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created, edited]
|
|
issues:
|
|
types: [opened, edited]
|
|
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
try-minimize:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
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@v6
|
|
timeout-minutes: 3
|
|
with:
|
|
script: |
|
|
const script = require('.github/workflows/image-minimizer.js');
|
|
await script({github, context});
|