diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d696ca5aa2ac..fe83bdf699b0 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -20,7 +20,11 @@ jobs: python-version: "3.x" - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 with: - extra-args: --hook-stage manual --all-files + extra-args: --hook-stage manual --all-files --skip oxipng + # Only run oxipng on the last diff, because we haven't updated all images. + - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 + with: + extra-args: --hook-stage manual --from-ref origin/${{ github.base_ref }} oxipng ruff: name: ruff diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f2b94141984..33e3aec385d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -135,3 +135,7 @@ repos: name: "Validate Conda environment file" files: ^environment\.yml$ args: ["--verbose", "--schemafile", "ci/schemas/conda-environment.json"] + - repo: https://github.com/shssoichiro/oxipng + rev: d54e7c04ea58170167d95d9b2b2ec07571602fe2 # frozen: v10.1.0 + hooks: + - id: oxipng