From ece28185612ac48e9d4317edb207e86945ba33e4 Mon Sep 17 00:00:00 2001 From: Patrick Heneise Date: Wed, 8 Nov 2023 14:21:23 -0500 Subject: [PATCH] feat: add image compression workflow --- .github/workflows/compress-images.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/compress-images.yml diff --git a/.github/workflows/compress-images.yml b/.github/workflows/compress-images.yml new file mode 100644 index 0000000..40b80d4 --- /dev/null +++ b/.github/workflows/compress-images.yml @@ -0,0 +1,24 @@ +# https://github.com/marketplace/actions/image-actions + +name: Compress Images +on: + pull_request: + paths: + - public/photos/*.jpg + - public/photos/*.jpeg + - public/photos/*.png + - public/photos/*.webp +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 + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Compress Images + uses: calibreapp/image-actions@main + with: + githubToken: ${{ secrets.GITHUB_TOKEN }}