From df8a114a0c28c5e80cb3b3734d7ddfda84530631 Mon Sep 17 00:00:00 2001 From: Matthew Daubney Date: Sun, 27 Sep 2026 14:17:58 +0100 Subject: [PATCH] ci: trigger ScrobbledDeploy on semver tag releases After images publish for a v* tag, call the Gitea API to dispatch ScrobbledDeploy's deploy workflow with the released version, so a tagged release automatically redeploys the app tier. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c2b47fa..9ea3e33 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -101,6 +101,7 @@ jobs: runs-on: ubuntu-latest outputs: tags: ${{ steps.version.outputs.image_tags }} + version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v4 - uses: https://github.com/astral-sh/setup-uv@v6 @@ -179,8 +180,24 @@ jobs: --publish-url "https://${{ vars.PKGS_HOST }}/pypi/${{ vars.PKGS_PYPI_FEED }}/legacy" --username api --password "${{ secrets.PKGS_API_KEY }}" + trigger-deploy: + needs: [images] + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - name: Trigger ScrobbledDeploy + env: + VERSION: ${{ needs.images.outputs.version }} + TOKEN: ${{ secrets.SCROBBLEDDEPLOY_DISPATCH_TOKEN }} + run: | + curl -fsS -X POST \ + -H "Authorization: token ${TOKEN}" \ + -H "Content-Type: application/json" \ + -d "{\"ref\":\"main\",\"inputs\":{\"image_tag\":\"${VERSION}\"}}" \ + "https://git.daubney.dev/api/v1/repos/matt/ScrobbledDeploy/actions/workflows/deploy.yml/dispatches" + notify: - needs: [lint, test, validate-monitoring, federation-interop, images, assets, python-package] + needs: [lint, test, validate-monitoring, federation-interop, images, assets, python-package, trigger-deploy] if: always() runs-on: ubuntu-latest steps: