aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/calibreapp-image-actions.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/calibreapp-image-actions.yml')
-rw-r--r--.github/workflows/calibreapp-image-actions.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml
new file mode 100644
index 000000000..08987b3aa
--- /dev/null
+++ b/.github/workflows/calibreapp-image-actions.yml
@@ -0,0 +1,32 @@
+name: Compress Images
+
+on:
+ pull_request:
+ paths:
+ - '**.jpg'
+ - '**.jpeg'
+ - '**.png'
+ - '**.webp'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ # 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:
+ # allow calibreapp/image-actions to update PRs
+ pull-requests: write
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+
+ - name: Compress Images
+ uses: calibreapp/[email protected]
+ with:
+ githubToken: ${{ secrets.GITHUB_TOKEN }}