From eba7c97de614a7c93638f7f5254753903762260f Mon Sep 17 00:00:00 2001 From: Matthew Daubney Date: Mon, 2 Nov 2026 13:13:00 +0000 Subject: [PATCH] Release: dispatch the deploy after the image is pushed Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 39a1075..fbac83c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -58,3 +58,18 @@ jobs: docker build -t "$IMAGE:$VERSION" -t "$IMAGE:latest" . docker push "$IMAGE:$VERSION" docker push "$IMAGE:latest" + + # Gitea cannot trigger another repo's workflow from a tag, so dispatch the deploy via the API. + trigger-deploy: + needs: [image] + if: ${{ !contains(github.ref_name, '-') }} + runs-on: ubuntu-latest + steps: + - name: Dispatch the deploy + env: + TAG: ${{ github.ref_name }} + TOKEN: ${{ secrets.DEPLOY_DISPATCH_TOKEN }} + run: | + curl -fsS -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ + -d "{\"ref\":\"main\",\"inputs\":{\"tag\":\"$TAG\"}}" \ + "${{ gitea.server_url }}/api/v1/repos/matt/EnvBaoAdminDeploy/actions/workflows/deploy.yml/dispatches"