mirror of
https://github.com/ivuorinen/.github.git
synced 2026-02-06 05:43:42 +00:00
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
---
|
|
name: Compress Images
|
|
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMAND: false
|
|
|
|
on:
|
|
pull_request:
|
|
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
|
|
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
|
|
paths:
|
|
- "**.jpg"
|
|
- "**.jpeg"
|
|
- "**.png"
|
|
- "**.webp"
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: read
|
|
statuses: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
CompressInPR:
|
|
# Only run on Pull Requests within the same repository, and not from forks.
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
name: calibreapp/image-actions
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: read
|
|
statuses: write
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Compress Images
|
|
uses: calibreapp/image-actions@main
|
|
with:
|
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|