From 04b994414046cabb50edfe976530ba7051b43c1b Mon Sep 17 00:00:00 2001 From: Tudor Date: Tue, 24 Mar 2026 11:45:18 +0000 Subject: [PATCH] ci: add integrator image build to Gitea Actions Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/build-and-push.yml | 42 ++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index 4f03f8f..b6600b8 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -12,6 +12,7 @@ env: REGISTRY: privaterepo.sitaru.org BACKEND_IMAGE_NAME: ${{ gitea.repository }}-backend FRONTEND_IMAGE_NAME: ${{ gitea.repository }}-frontend + INTEGRATOR_IMAGE_NAME: ${{ gitea.repository }}-integrator jobs: build-backend: @@ -95,10 +96,49 @@ jobs: # cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.FRONTEND_IMAGE_NAME }}:buildcache # cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.FRONTEND_IMAGE_NAME }}:buildcache,mode=max + build-integrator: + name: Build Integrator + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ gitea.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Extract metadata for Integrator Docker image + id: meta-integrator + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.INTEGRATOR_IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha,prefix=integrator- + type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/main' }} + + - name: Build and push Integrator Docker image + uses: docker/build-push-action@v5 + with: + context: ./integrator + file: ./integrator/Dockerfile + push: ${{ gitea.event_name != 'pull_request' }} + tags: ${{ steps.meta-integrator.outputs.tags }} + labels: ${{ steps.meta-integrator.outputs.labels }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.INTEGRATOR_IMAGE_NAME }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.INTEGRATOR_IMAGE_NAME }}:buildcache,mode=max + trigger-deployment: name: Trigger Portainer Update runs-on: ubuntu-latest - needs: [build-backend, build-frontend] + needs: [build-backend, build-frontend, build-integrator] if: gitea.event_name != 'pull_request' steps: - name: Trigger Portainer stack update