diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml index 21d8872..54f8b56 100644 --- a/.gitea/workflows/build-and-push.yml +++ b/.gitea/workflows/build-and-push.yml @@ -14,6 +14,7 @@ env: FRONTEND_IMAGE_NAME: ${{ gitea.repository }}-frontend INTEGRATOR_IMAGE_NAME: ${{ gitea.repository }}-integrator KESTRA_INIT_IMAGE_NAME: ${{ gitea.repository }}-kestra-init + PIPELINE_IMAGE_NAME: ${{ gitea.repository }}-pipeline jobs: build-backend: @@ -171,10 +172,49 @@ jobs: tags: ${{ steps.meta-kestra-init.outputs.tags }} labels: ${{ steps.meta-kestra-init.outputs.labels }} + build-pipeline: + name: Build Pipeline (Meltano + dbt + Airflow) + 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 Pipeline Docker image + id: meta-pipeline + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.PIPELINE_IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha,prefix=pipeline- + type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/main' }} + + - name: Build and push Pipeline Docker image + uses: docker/build-push-action@v5 + with: + context: ./pipeline + file: ./pipeline/Dockerfile + push: ${{ gitea.event_name != 'pull_request' }} + tags: ${{ steps.meta-pipeline.outputs.tags }} + labels: ${{ steps.meta-pipeline.outputs.labels }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.PIPELINE_IMAGE_NAME }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.PIPELINE_IMAGE_NAME }}:buildcache,mode=max + trigger-deployment: name: Trigger Portainer Update runs-on: ubuntu-latest - needs: [build-backend, build-frontend, build-integrator, build-kestra-init] + needs: [build-backend, build-frontend, build-integrator, build-kestra-init, build-pipeline] if: gitea.event_name != 'pull_request' steps: - name: Trigger Portainer stack update