From 118fd39f870cd075681593f4d6835dc97cf1566b Mon Sep 17 00:00:00 2001 From: sax3l Date: Mon, 2 Nov 2026 18:30:44 +0100 Subject: [PATCH] ci(smoke): read main SHA from the commits list endpoint /commits/main returns 404 on this Gitea; use /commits?limit=1 and parse the first sha with python instead of a greedy sed. --- .gitea/workflows/prod-smoke.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/prod-smoke.yml b/.gitea/workflows/prod-smoke.yml index 4357861..dd33821 100644 --- a/.gitea/workflows/prod-smoke.yml +++ b/.gitea/workflows/prod-smoke.yml @@ -55,8 +55,8 @@ jobs: fi expected="$(curl -fsS --max-time 15 \ -H "Authorization: token ${SIAX_CI_TOKEN}" \ - https://git.siax.io/api/v1/repos/admin/0pt/commits/main \ - | sed -n 's/.*"sha":"\([0-9a-f]*\)".*/\1/p')" + "https://git.siax.io/api/v1/repos/admin/0pt/commits?limit=1" \ + | python3 -c 'import sys,json; print(json.load(sys.stdin)[0]["sha"])')" echo "running=$running expected(main)=$expected" [ -n "$expected" ] || { echo "::error::could not read main SHA from Gitea"; exit 1; } [ "$running" = "$expected" ] || { -- 2.54.0