From feda8a0b4b7b51bbc073b1bcca27c92c3cd2b148 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 13 May 2026 03:40:41 +0800 Subject: [PATCH] fix(ci): harden migration audit seed --- .gitea/workflows/run-migration.yml | 16 +++++++--------- docs/LOGBOOK.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/run-migration.yml b/.gitea/workflows/run-migration.yml index 3ed3ad85..0ec25bf7 100644 --- a/.gitea/workflows/run-migration.yml +++ b/.gitea/workflows/run-migration.yml @@ -133,13 +133,15 @@ jobs: PGURL_PSQL="${PGURL/postgresql+asyncpg:\/\//postgresql:\/\/}" OWNER_PGURL_PSQL="${OWNER_PGURL/postgresql+asyncpg:\/\//postgresql:\/\/}" FILES_JSON=$(echo "${{ steps.diff.outputs.new_files }}" | jq -Rn '[inputs | select(length > 0)]') + SUMMARY_JSON=$(jq -cn \ + --arg commit_sha "${{ github.sha }}" \ + --argjson files "$FILES_JSON" \ + '{type: "ci_migration", commit_sha: $commit_sha, files: $files}') + SUMMARY_JSON_SQL=${SUMMARY_JSON//\'/\'\'} seed_audit() { local url="$1" - psql "$url" \ - -v ON_ERROR_STOP=1 \ - -v commit_sha="${{ github.sha }}" \ - -v files_json="$FILES_JSON" <<'SQL' + psql "$url" -v ON_ERROR_STOP=1 <