From 83b553b58ec0ec5d5b0337c18ed0c27d2e0dddd8 Mon Sep 17 00:00:00 2001 From: Barcode Betty <32+cs_betty@noreply.git.farh.net> Date: Wed, 3 Jun 2026 20:53:54 +0000 Subject: [PATCH] ci: delete overlay deploy branches after merge Set delete_branch_after_merge:true on the auto-merge POST in both deploy-dev and deploy-uat so the per-deploy branches in cartsnitch/infra (ci/deploy-{dev,uat}-${GITHUB_SHA}) are removed once their overlay image-tag bump lands on main. Without this flag every successful deploy would leave a branch behind, accumulating in cartsnitch/infra and making future re-runs of the same SHA un-actionable from the existing branch name. Refs CAR-1195 (CTO fix #2). --- .gitea/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 662dc7b..27e95eb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -570,7 +570,7 @@ jobs: MERGE_RESP=$(curl -sS -X POST \ -H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Content-Type: application/json" \ - -d '{"Do":"merge"}' \ + -d '{"Do":"merge","delete_branch_after_merge":true}' \ "https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge") MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false') if [ "$MERGED" != "true" ]; then @@ -696,7 +696,7 @@ jobs: MERGE_RESP=$(curl -sS -X POST \ -H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Content-Type: application/json" \ - -d '{"Do":"merge"}' \ + -d '{"Do":"merge","delete_branch_after_merge":true}' \ "https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge") MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false') if [ "$MERGED" != "true" ]; then