From 673fa88a58d7a8fc46e466bd9a9961cf3a85ad87 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 30 Oct 2026 13:27:09 -0400 Subject: [PATCH 1/4] ci: temporary tag creation probe --- .github/workflows/tag-probe.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/tag-probe.yml diff --git a/.github/workflows/tag-probe.yml b/.github/workflows/tag-probe.yml new file mode 100644 index 00000000..778ce7f4 --- /dev/null +++ b/.github/workflows/tag-probe.yml @@ -0,0 +1,21 @@ +name: tag-probe +on: pull_request +permissions: + contents: write +jobs: + probe: + runs-on: blacksmith-2vcpu-ubuntu-2404 + env: + GH_TOKEN: ${{ github.token }} + R: ${{ github.repository }} + steps: + - name: Probe tag creation with the built-in token + run: | + probe() { # $1 label, $2 sha + echo "== $1 ($2)" + out=$(gh api -i -X POST "repos/$R/git/refs" -f ref="refs/tags/probe-$1-$GITHUB_RUN_ID" -f sha="$2" 2>&1) + echo "$out" | grep -iE '^HTTP/|x-accepted-github-permissions|"message"' || true + gh api -X DELETE "repos/$R/git/refs/tags/probe-$1-$GITHUB_RUN_ID" >/dev/null 2>&1 && echo "deleted" + } + probe release-commit 50e819a65a4b39fa7a198860e1c9f3039fc0cbab + probe v1210-commit {"message":"Not Found","documentation_url":"https://docs.github.com/rest/git/tags#get-a-tag","status":"404"}c0f78436b74682e0961c09e9e79c06613eb51fd2 From 791f9a97787a734a812d50198f95499609818dd8 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 30 Oct 2026 13:27:19 -0400 Subject: [PATCH 2/4] ci: fix probe sha --- .github/workflows/tag-probe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-probe.yml b/.github/workflows/tag-probe.yml index 778ce7f4..f4bdc075 100644 --- a/.github/workflows/tag-probe.yml +++ b/.github/workflows/tag-probe.yml @@ -18,4 +18,4 @@ jobs: gh api -X DELETE "repos/$R/git/refs/tags/probe-$1-$GITHUB_RUN_ID" >/dev/null 2>&1 && echo "deleted" } probe release-commit 50e819a65a4b39fa7a198860e1c9f3039fc0cbab - probe v1210-commit {"message":"Not Found","documentation_url":"https://docs.github.com/rest/git/tags#get-a-tag","status":"404"}c0f78436b74682e0961c09e9e79c06613eb51fd2 + probe v1210-commit c0f78436b74682e0961c09e9e79c06613eb51fd2 From 4649c2751433af7d47cef253ea2aceb3ecd3f6e6 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 30 Oct 2026 13:28:06 -0400 Subject: [PATCH 3/4] ci: keep the probe running after a failed call --- .github/workflows/tag-probe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-probe.yml b/.github/workflows/tag-probe.yml index f4bdc075..8c1b16e2 100644 --- a/.github/workflows/tag-probe.yml +++ b/.github/workflows/tag-probe.yml @@ -13,7 +13,7 @@ jobs: run: | probe() { # $1 label, $2 sha echo "== $1 ($2)" - out=$(gh api -i -X POST "repos/$R/git/refs" -f ref="refs/tags/probe-$1-$GITHUB_RUN_ID" -f sha="$2" 2>&1) + out=$(gh api -i -X POST "repos/$R/git/refs" -f ref="refs/tags/probe-$1-$GITHUB_RUN_ID" -f sha="$2" 2>&1) || true echo "$out" | grep -iE '^HTTP/|x-accepted-github-permissions|"message"' || true gh api -X DELETE "repos/$R/git/refs/tags/probe-$1-$GITHUB_RUN_ID" >/dev/null 2>&1 && echo "deleted" } From 33094f00123dd37b63496ff2baf59ff5cbe93f0e Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 30 Oct 2026 13:28:51 -0400 Subject: [PATCH 4/4] ci: keep the probe running when there is nothing to delete --- .github/workflows/tag-probe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-probe.yml b/.github/workflows/tag-probe.yml index 8c1b16e2..604b2a14 100644 --- a/.github/workflows/tag-probe.yml +++ b/.github/workflows/tag-probe.yml @@ -15,7 +15,7 @@ jobs: echo "== $1 ($2)" out=$(gh api -i -X POST "repos/$R/git/refs" -f ref="refs/tags/probe-$1-$GITHUB_RUN_ID" -f sha="$2" 2>&1) || true echo "$out" | grep -iE '^HTTP/|x-accepted-github-permissions|"message"' || true - gh api -X DELETE "repos/$R/git/refs/tags/probe-$1-$GITHUB_RUN_ID" >/dev/null 2>&1 && echo "deleted" + gh api -X DELETE "repos/$R/git/refs/tags/probe-$1-$GITHUB_RUN_ID" >/dev/null 2>&1 && echo "deleted" || true } probe release-commit 50e819a65a4b39fa7a198860e1c9f3039fc0cbab probe v1210-commit c0f78436b74682e0961c09e9e79c06613eb51fd2