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..55d8c37 --- /dev/null +++ b/.glimpse-baseline.json @@ -0,0 +1,14 @@ +{ + "_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": 41062, + "xxh128": "b32bd37e614d1dc703cbe37f0e259cd7", + "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