From 04b824257b47d273d0a7ec0eb1c887cc2a145a03 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Mon, 26 Oct 2020 19:26:28 +0100 Subject: [PATCH] Add https://github.com/calibreapp/image-actions --- .../workflows/calibreapp-image-actions.yml | 31 +++++++++++++++++++ 1 file changed, 31 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 000000000..3b7c18bf1 --- /dev/null +++ b/.github/workflows/calibreapp-image-actions.yml @@ -0,0 +1,31 @@ +name: Compress Images on Push to Master +on: + push: + branches: + - master + paths: + - '**.jpg' + - '**.jpeg' + - '**.png' + - '**.webp' +jobs: + build: + name: calibreapp/image-actions + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Compress Images + id: calibre + uses: calibreapp/image-actions@master + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + compressOnly: true + - name: Create New Pull Request If Needed + if: steps.calibre.outputs.markdown != '' + uses: peter-evans/create-pull-request@master + with: + title: Compressed Images + branch-suffix: timestamp + commit-message: Compressed Images + body: ${{ steps.calibre.outputs.markdown }}