From d8ea6ec9f1bd0727f845c205a0625ae1937dc53c Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 8 Aug 2026 20:22:32 -0300 Subject: [PATCH] fix(ci): detect initial metrics snapshot --- .github/workflows/registry-metrics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/registry-metrics.yml b/.github/workflows/registry-metrics.yml index a759db1..fddc7ae 100644 --- a/.github/workflows/registry-metrics.yml +++ b/.github/workflows/registry-metrics.yml @@ -45,12 +45,12 @@ jobs: git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - if git diff --quiet -- metrics/registry-history.jsonl; then + git add metrics/registry-history.jsonl + if git diff --cached --quiet -- metrics/registry-history.jsonl; then echo "No new snapshot data to commit." exit 0 fi - git add metrics/registry-history.jsonl # [skip ci] prevents this bot commit from triggering other push-based # workflows (e.g. the registry publish workflow) in this repo. git commit -m "chore(metrics): registry snapshot $(date -u +%Y-%m-%d) [skip ci]"