Release: dispatch the deploy after the image is pushed
CI / integration (push) Successful in 13s
CI / check (push) Successful in 17s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-11-02 13:13:00 +00:00
1 parent b1516f1eb0
commit eba7c97de6
1 file changed
+15
+15
View File
@@ -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"