mirror of
https://github.com/Nostalgica-Reverie/Content-Monorepo.git
synced 2026-05-09 00:24:15 +00:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: "PNG Optimization"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
bulk-nuke:
|
|
runs-on: technocality
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 1
|
|
filter: blob:none
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "maintenance-tools"
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache oxipng
|
|
id: cache-oxipng
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cargo/bin/oxipng
|
|
key: ${{ runner.os }}-oxipng-v1
|
|
|
|
- name: Install oxipng
|
|
if: steps.cache-oxipng.outputs.cache-hit != 'true'
|
|
run: cargo install oxipng
|
|
|
|
- name: Run Optimization
|
|
run: |
|
|
oxipng -r -o 4 -v --strip all "resourcepacks/" "modpacks/" "datapacks/"
|
|
|
|
- name: Commit Optimized Images
|
|
uses: https://github.com/EndBug/add-and-commit@v9
|
|
with:
|
|
author_name: forgejo-actions[bot]
|
|
author_email: omo50@noreply.nostalgica.net
|
|
message: 'chore: bulk png optimization'
|
|
add: '**/*.png' |