From bd1de74e943c5ff7b858aedf3675d7ae28b2046d Mon Sep 17 00:00:00 2001 From: Mathias Grimm Date: Mon, 20 Jul 2026 10:24:37 -0300 Subject: [PATCH] Add glimpse image check workflow Scaffold from glimpse init --workflow: .glimpseignore, a seeded .glimpse-baseline.json with the 10 current images, and a GitHub Actions workflow that runs glimpse check on pushes to main and on pull requests. Co-Authored-By: Claude Fable 5 --- .github/workflows/glimpse.yml | 27 ++++++++++++++++ .glimpse-baseline.json | 59 +++++++++++++++++++++++++++++++++++ .glimpseignore | 18 +++++++++++ 3 files changed, 104 insertions(+) create mode 100644 .github/workflows/glimpse.yml create mode 100644 .glimpse-baseline.json create mode 100644 .glimpseignore diff --git a/.github/workflows/glimpse.yml b/.github/workflows/glimpse.yml new file mode 100644 index 0000000..e63dade --- /dev/null +++ b/.github/workflows/glimpse.yml @@ -0,0 +1,27 @@ +name: Glimpse + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + check-images: + runs-on: ubuntu-latest + env: + GLIMPSE_TOKEN: ${{ secrets.GLIMPSE_TOKEN }} + steps: + - uses: actions/checkout@v6 + - name: Install glimpse + run: | + composer global require --no-interaction --no-progress mathiasgrimm/glimpse-cli + composer global config bin-dir --absolute --quiet >> "$GITHUB_PATH" + - name: Check images + if: env.GLIMPSE_TOKEN != '' + run: glimpse check . + - name: Skipped (no token) + if: env.GLIMPSE_TOKEN == '' + run: echo "::warning::GLIMPSE_TOKEN is not available (fork PR, or the secret is not set); image check skipped." diff --git a/.glimpse-baseline.json b/.glimpse-baseline.json new file mode 100644 index 0000000..bf08c6a --- /dev/null +++ b/.glimpse-baseline.json @@ -0,0 +1,59 @@ +{ + "_readme": [ + "Images already handled by glimpse: check and analyze skip a file while its size and xxh128 content hash still match its entry.", + "via records the operation that wrote the entry: analyze means accepted as-is by --update-baseline, optimize means the optimizer chain ran (the optimize command or any transform's --optimize flag), and other values name the command that produced the file.", + "This file is @generated by glimpse and rewritten on every update; do not edit by hand. See https://glimpseimg.com/docs/cli/project-setup#glimpse-baselinejson" + ], + "files": { + "art/banner.avif": { + "size": 12401, + "xxh128": "3c283403759032b79a3e14a28934f062", + "via": "analyze" + }, + "docs/cli-json.avif": { + "size": 39097, + "xxh128": "408fee7b8ddd66a38a69f6a2233046fd", + "via": "analyze" + }, + "docs/cli.avif": { + "size": 39356, + "xxh128": "2ab6ad600c72d51bf7d4cd94ec765d27", + "via": "analyze" + }, + "docs/dashboard-dark.avif": { + "size": 76166, + "xxh128": "88f742ca5bc7284230cd8a79ea6231fb", + "via": "analyze" + }, + "docs/dashboard-json-dark.avif": { + "size": 27147, + "xxh128": "936b58ec90ecc80828276f2a512e0e79", + "via": "analyze" + }, + "docs/dashboard-json-format.avif": { + "size": 39101, + "xxh128": "c30771e3c29ad61d90dbcd521dd9c95c", + "via": "analyze" + }, + "docs/dashboard-json-light.avif": { + "size": 30540, + "xxh128": "77fd891c03a639f86607e01f6008aa00", + "via": "analyze" + }, + "docs/dashboard-light.avif": { + "size": 82253, + "xxh128": "cf0b75835e2d73a2074320eee2f0e463", + "via": "analyze" + }, + "docs/export-image-dark.avif": { + "size": 54852, + "xxh128": "215150e63049d37e8ebde55a436a0819", + "via": "analyze" + }, + "docs/export-image-light.avif": { + "size": 61131, + "xxh128": "e5c643daf22ea769fa0a2c09bd483a7f", + "via": "analyze" + } + } +} diff --git a/.glimpseignore b/.glimpseignore new file mode 100644 index 0000000..060e176 --- /dev/null +++ b/.glimpseignore @@ -0,0 +1,18 @@ +# Created by glimpse init. Paths listed here are excluded from glimpse +# scans (check, analyze), using gitignore syntax relative to this file. + +# Dependencies you do not control +vendor/ +node_modules/ + +# Generated and built assets +public/build/ +dist/ + +# Runtime state and user uploads (Laravel) +storage/ + +# Favicons and touch icons: tiny and format-constrained, not worth optimizing +favicon.ico +favicon*.png +apple-touch-icon*.png