From 5745a2334a20032ca7cef31ecf983b0108112669 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 17 Feb 2026 17:27:17 -0600 Subject: [PATCH] fix: use Gitea API for tag creation to avoid branch protection failures The git push approach fails on protected main branches. Switch to the Gitea REST API (POST /repos/{repo}/tags) matching the fix already applied to Paper Dynasty's workflow. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/docker-build.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index 87c8106..7959ba3 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -87,17 +87,16 @@ jobs: cache-from: type=registry,ref=manticorum67/major-domo-discordapp:buildcache cache-to: type=registry,ref=manticorum67/major-domo-discordapp:buildcache,mode=max - # Create git tag and update VERSION file on successful push + # Create git tag via Gitea API (avoids branch protection issues) - name: Tag release if: success() && github.ref == 'refs/heads/main' run: | - git config user.name "Gitea Actions" - git config user.email "actions@git.manticorum.com" - echo "${{ steps.meta.outputs.version }}" > VERSION - git add VERSION - git commit -m "chore: bump version to ${{ steps.meta.outputs.version }} [skip ci]" || true - git tag "${{ steps.meta.outputs.version }}" - git push origin main --tags + curl -s -X POST \ + -H "Authorization: token ${{ github.token }}" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\": \"${{ steps.meta.outputs.version }}\", \"target\": \"${{ github.sha }}\", \"name\": \"${{ steps.meta.outputs.version }}\"}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/tags" + echo "Created tag ${{ steps.meta.outputs.version }}" - name: Build Summary run: |