From 806b0a98c8c26849a97da763c5e1934ed4362f2e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 3 Jan 2026 20:40:56 +0100 Subject: [PATCH] ci: trigger build on version tag push with auto-release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed workflow to: - Trigger on push of v* tags instead of release publish - Auto-create Gitea release via API - Then build and push Docker image This simplifies deployment: just push a version tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0b21c27..fc75587 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,15 +1,27 @@ name: Build and Push on: - release: - types: [published] + push: + tags: + - 'v*' jobs: - build: + release: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Create Gitea Release + run: | + curl -sf -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{"tag_name": "${{ github.ref_name }}", "name": "Release ${{ github.ref_name }}", "body": "Automated release for ${{ github.ref_name }}"}' \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" + + build: + runs-on: ubuntu-latest + needs: release + steps: + - uses: actions/checkout@v4 - name: Login to Gitea Registry uses: docker/login-action@v3