Skip to content

Commit

Permalink
Run shrink images on push and pull_request open (#3376)
Browse files Browse the repository at this point in the history
* run this on both PR open and push.

The issue is if you only run it on push, it misses the first time you push up new images (that is what happened here: #3375 ) because there is no PR open at that time, so the script fails. See this run for example: https://github.com/FusionAuth/fusionauth-site/actions/runs/11731437467

So we need to run this both on PR open (so it catches this case) and on push, so that when an image is updated in a PR or a new image is added, we catch it.

There's some worry about degradation of images due to repeated shrinking, but I haven't seen that play out in practice
  • Loading branch information
mooreds authored Nov 19, 2024
1 parent 8c47157 commit 1292877
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/shrink-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ on:
branches-ignore:
- main
paths:
- 'astro/public/**'
- 'astro/public/img/**/*.png'
pull_request:
branches-ignore:
- main
paths:
- 'astro/public/img/**/*.png'

jobs:
shrink:
Expand Down

0 comments on commit 1292877

Please sign in to comment.