Skip to content

Commit e4b9792

Browse files
authored
pre-commit: add oxipng for lossless PNG compression (#362)
1 parent ee96ec5 commit e4b9792

329 files changed

Lines changed: 9 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
name: Lint
18+
name: pre-commit
1919

2020
on: [pull_request]
2121

@@ -45,3 +45,5 @@ jobs:
4545
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
4646
- name: Run pre-commit
4747
run: pre-commit run --all-files
48+
- name: Run manual pre-commit hooks
49+
run: pre-commit run --all-files --hook-stage manual

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ repos:
2626
hooks:
2727
- id: identity
2828
- id: check-hooks-apply
29+
- repo: https://github.com/oxipng/oxipng
30+
rev: v9.1.5
31+
hooks:
32+
- id: oxipng
33+
args: ['--fix', '-o', '4', '--strip', 'safe', '--alpha']
34+
stages: [manual]
2935
- repo: https://github.com/pre-commit/pre-commit-hooks
3036
rev: v5.0.0
3137
hooks:

blog/.blog-template/header.png

-204 KB
-240 KB
-937 KB
-211 KB
-196 KB
-221 KB
-192 KB
-200 KB

0 commit comments

Comments
 (0)