ci(release): install static docker CLI on amd64 jobs #28

Merged
sirius merged 2 commits from wt/t_2c84cd13 into main 2026-09-12 05:10:07 +00:00
Showing only changes of commit 898b943485 - Show all commits

ci(release): share ci.yml concurrency; make cleanup actually delete
Some checks failed
ci / test (pull_request) Failing after 2m51s

Use onionwire-ci-pi so cargo release builds cannot race tests on the
Pi's shared /target volume. Strip PAT newlines in cleanup and treat
publish skipped/failed as the signal to delete the tag this run created,
so the next run retries the same version instead of advancing.
Sirius DevOps 2026-09-12 01:09:46 -04:00
No known key found for this signature in database

View file

@ -28,8 +28,11 @@ on:
type: string
default: "false"
# Same group as ci.yml: both cargo builds share the Pi's 4 cores and the
# onionwire-cargo-registry volume. A separate group raced tests and produced
# Permission denied (os error 13) on /target/debug/deps/* binaries.
concurrency:
group: onionwire-release
group: onionwire-ci-pi
cancel-in-progress: false
env:
@ -352,7 +355,7 @@ jobs:
cleanup:
needs: [version, aarch64, x86_64, publish]
if: ${{ always() && needs.version.outputs.created_tag == 'true' && (needs.aarch64.result != 'success' || needs.x86_64.result != 'success' || needs.publish.result != 'success') }}
if: ${{ always() && needs.version.result == 'success' && needs.version.outputs.created_tag == 'true' && needs.publish.result != 'success' }}
runs-on: docker
timeout-minutes: 10
steps:
@ -363,6 +366,7 @@ jobs:
TAG: ${{ needs.version.outputs.tag }}
run: |
set -euo pipefail
FORGEJO_TOKEN=$(printf '%s' "$FORGEJO_TOKEN" | tr -d '\r\n')
echo "fail-closed: removing tag $TAG created by this run"
code=$(curl -sS --http1.1 -o /tmp/rel.json -w '%{http_code}' \
-H "Authorization: Bearer $FORGEJO_TOKEN" \
@ -370,10 +374,17 @@ jobs:
if [ "$code" = "200" ]; then
rid=$(python3 -c "import json; print(json.load(open('/tmp/rel.json'))['id'])")
echo "deleting incomplete release id $rid"
curl -sS --http1.1 -X DELETE -H "Authorization: Bearer $FORGEJO_TOKEN" \
curl -sS --http1.1 -X DELETE \
-H "Authorization: Bearer $FORGEJO_TOKEN" \
"$REPO_API/releases/$rid" -o /dev/null -w "DELETE release HTTP %{http_code}\n"
else
echo "no release for $TAG (HTTP $code)"
fi
curl -sS --http1.1 -X DELETE -H "Authorization: Bearer $FORGEJO_TOKEN" \
"$REPO_API/tags/$TAG" -o /dev/null -w "DELETE tag HTTP %{http_code}\n"
del=$(curl -sS --http1.1 -o /tmp/tag-del.json -w '%{http_code}' -X DELETE \
-H "Authorization: Bearer $FORGEJO_TOKEN" \
"$REPO_API/tags/$TAG")
echo "DELETE tag HTTP $del"
if [ "$del" != "204" ] && [ "$del" != "404" ]; then
cat /tmp/tag-del.json >&2 || true
exit 1
fi