I asked on twitter about some support and was directed here. Hopefully this is relatively trivial and can be addressed really quickly.
I am looking to use image actions to check our codebase on a weekly basis for uncompressed assets, and also "on demand" if we're doing a lot of work with our images. The challenge Im facing is that I'm unable to get Image Actions to create a PR once it has checked the images. I can see that its correctly traversing the code, however base but it is skipping the "Create New Pull Request If Needed" step.
Our branching strategy does not allow direct commits to master, could this be related?
name: Compress Images
on:
workflow_dispatch:
schedule:
# run weekly every Sunday night
- cron: '0 23 * * SUN'
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Compress Images
uses: calibreapp/image-actions@master
with:
ignorePaths: 'node_modules/**'
jpegQuality: '80'
jpegProgressive: false
pngQuality: '80'
webpQuality: '80'
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 Weekly
branch-suffix: timestamp
commit-message: Automated Weekly Image Compression
body: ${{ steps.calibre.outputs.markdown }}
- Processing: /github/workspace/public/themes/modernist/4px_solid_border.png config={"quality":80} output={"format":"png","width":1,"height":4,"channels":4,"premultiplied":false,"size":94}
- Processing: /github/workspace/public/themes/modernist/border_emphasised_print.png config={"quality":80} output={"format":"png","width":778,"height":4,"channels":4,"premultiplied":false,"size":139}
- Processing: /github/workspace/public/themes/modernist/border_emphasised.png config={"quality":80} output={"format":"png","width":764,"height":4,"channels":4,"premultiplied":false,"size":137}
- Processing: /github/workspace/public/themes/modernist/border_print.png config={"quality":80} output={"format":"png","width":778,"height":4,"channels":4,"premultiplied":false,"size":135}
- Processing: /github/workspace/public/themes/modernist/border.png config={"quality":80} output={"format":"png","width":764,"height":4,"channels":4,"premultiplied":false,"size":136}
- Processing: /github/workspace/public/themes/modernist/dotted_border.png config={"quality":80} output={"format":"png","width":5,"height":1,"channels":4,"premultiplied":false,"size":95}
->> Generating markdown…
->> Using config: {"jpeg":{"quality":80,"progressive":false},"png":{"quality":80},"webp":{"quality":80},"ignorePaths":["node_modules/**","spec/fixtures/files/**","compartments/loader/spec/test_app/**"],"compressOnly":true}
Am I missing something here? I know we have a number of uncompressed images in our code.
Thank you.