From 446abb4359f6d6363f3d5585ea94c82b2429c24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Sun, 5 Apr 2026 15:40:08 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20release=20workflow=20on=20tag=20push=20?= =?UTF-8?q?=E2=86=92=20ghcr=20multi-image=20publish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .gitea/workflows/release.yml runs on any v-prefixed tag push (and on workflow_dispatch with a manual tag input). Strips the v prefix, logs in to ghcr.io via the GHCR_TOKEN repo secret, then runs the existing publish-images.sh → all 3 multi-arch images land with : + :latest tags. Workflow path from future releases: git tag v0.1.1 git push --tags gitea-vps v0.1.1 → 10 min later: ghcr.io/alezmad/claudemesh-*:0.1.1 + :latest live. Inert until act_runner is installed on gitea-vps (post-launch decision per ovhcloud-agutmou). Also serves as executable documentation for forkers on Gitea/GitHub. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/release.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..d47146b --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,61 @@ +name: Release + +# Triggers on any v-prefixed tag push: +# git tag v0.1.0 && git push --tags gitea-vps v0.1.0 +# +# Builds + pushes all 3 multi-arch images to +# ghcr.io/alezmad/claudemesh-{broker,web,migrate}: and :latest +# +# Prereq: the Gitea repo must have a secret named GHCR_TOKEN containing a +# GitHub personal access token with `write:packages` scope for the alezmad +# GHCR namespace. + +on: + push: + tags: + - "v*" + workflow_dispatch: + inputs: + tag: + description: "Tag to publish (without v prefix, e.g. 0.1.0)" + required: true + default: "latest" + +jobs: + publish: + name: Publish multi-arch images + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU (cross-arch emulation) + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Resolve tag + id: tag + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "value=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT" + else + # Strip leading v from git tag (v0.1.0 → 0.1.0) + echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + fi + + - name: Publish to ghcr.io/alezmad + env: + GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} + run: ./scripts/publish-images.sh "${{ steps.tag.outputs.value }}" + + - name: Summary + run: | + echo "## Released claudemesh ${{ steps.tag.outputs.value }}" >> "$GITHUB_STEP_SUMMARY" + echo "" >> "$GITHUB_STEP_SUMMARY" + echo "Pulled with:" >> "$GITHUB_STEP_SUMMARY" + echo '```bash' >> "$GITHUB_STEP_SUMMARY" + echo "docker pull ghcr.io/alezmad/claudemesh-broker:${{ steps.tag.outputs.value }}" >> "$GITHUB_STEP_SUMMARY" + echo "docker pull ghcr.io/alezmad/claudemesh-web:${{ steps.tag.outputs.value }}" >> "$GITHUB_STEP_SUMMARY" + echo "docker pull ghcr.io/alezmad/claudemesh-migrate:${{ steps.tag.outputs.value }}" >> "$GITHUB_STEP_SUMMARY" + echo '```' >> "$GITHUB_STEP_SUMMARY"