From 10fc5225c5a0f4f8fc3beaafce06b23e277e58e8 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 19 Apr 2021 19:52:04 +0300 Subject: [PATCH] Add `calibreapp/image-actions` (#499) This should optimize any new images for us in PRs. Signed-off-by: XhmikosR --- .../workflows/calibreapp-image-actions.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/calibreapp-image-actions.yml diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml new file mode 100644 index 0000000..17201f1 --- /dev/null +++ b/.github/workflows/calibreapp-image-actions.yml @@ -0,0 +1,24 @@ +name: Compress Images + +on: + pull_request: + paths: + - '**.jpg' + - '**.jpeg' + - '**.png' + - '**.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@v2 + + - name: Compress Images + uses: calibreapp/image-actions@1.1.0 # TODO: if they start using a tag like v1, switch to that + with: + githubToken: ${{ secrets.GITHUB_TOKEN }}