Add workflows to optimize PNG & SVG files - #9719
Draft
PikachuEXE wants to merge 7 commits into
Draft
Conversation
FreeTubeBot
enabled auto-merge (squash)
August 31, 2026 02:03
PikachuEXE
marked this pull request as draft
August 31, 2026 02:12
auto-merge was automatically disabled
August 31, 2026 02:12
Pull request was converted to draft
Member
Author
|
File diff one failed due unable to fetch branch from |
efb4f5ff-1298-471a-8973-3d47447115dc
requested changes
Sep 3, 2026
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
Member
There was a problem hiding this comment.
Failed to see that this PR was opened
Comment on lines
+50
to
+56
| - name: Compress SVG Images | ||
| run: pnpm dlx svgo -r -f . -o . | ||
| shell: bash | ||
|
|
||
| - name: Compress PNG Images | ||
| run: oxipng -o max --strip safe --recursive ./_icons ./src | ||
| shell: bash |
There was a problem hiding this comment.
Targeted dirs directly, remove recursive option as there isnt anything below those dirs. Let me know if you would prefer to include recursive anyway
Suggested change
| - name: Compress SVG Images | |
| run: pnpm dlx svgo -r -f . -o . | |
| shell: bash | |
| - name: Compress PNG Images | |
| run: oxipng -o max --strip safe --recursive ./_icons ./src | |
| shell: bash | |
| - name: Compress SVG Images | |
| run: | | |
| pnpm dlx svgo -f ./_icons -o ./_icons | |
| pnpm dlx svgo -f ./src/renderer/assets/img -o ./src/renderer/assets/img | |
| shell: bash | |
| - name: Compress PNG Images | |
| run: oxipng -o max --strip safe ./_icons ./src/renderer/assets/img | |
| shell: bash |
Comment on lines
+4
to
+7
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 0 * * 0' |
There was a problem hiding this comment.
Suggested change
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [development] | |
| paths: | |
| - '_icons/**' | |
| - 'src/renderer/assets/img/**' |
Comment on lines
+13
to
+16
| # As this action runs on a schedule, only run it in the FreeTubeApp/FreeTube repository to avoid unnecessary GitHub Actions usage/billing in forks. | ||
| # Still allow the workflow to be manually triggered. | ||
| # If a fork does need this workflow, they can change this condition in their fork to include their repository. | ||
| if: github.repository == 'FreeTubeApp/FreeTube' || github.event_name == 'workflow_dispatch' |
There was a problem hiding this comment.
Isnt needed anymore because there isnt a schedule
Suggested change
| # As this action runs on a schedule, only run it in the FreeTubeApp/FreeTube repository to avoid unnecessary GitHub Actions usage/billing in forks. | |
| # Still allow the workflow to be manually triggered. | |
| # If a fork does need this workflow, they can change this condition in their fork to include their repository. | |
| if: github.repository == 'FreeTubeApp/FreeTube' || github.event_name == 'workflow_dispatch' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Related issue
Existing image compression workflow seems broken and thus removed in #9686
Description
Workflows for compressing images like what's done in #9685
One for image compression and PR opening, another for commenting on file size change summary
Screenshots
Testing
I run new workflow manually which opened PikachuEXE#90 (file details should be default close but I forgot to commit that change before running)
See workflow runs in
Desktop
Additional context
Some previous discussion in PikachuEXE#87
Using https://github.com/PikachuEXE/FreeTube/tree/dev/image-optimize to test workflow runs (files there slightly different from PR