fix(kestra): bake flows into kestra-init image to fix empty /flows in container
Some checks failed
Build and Push Docker Images / Build Frontend (Next.js) (push) Has been cancelled
Build and Push Docker Images / Build Integrator (push) Has been cancelled
Build and Push Docker Images / Build Kestra Init (push) Has been cancelled
Build and Push Docker Images / Trigger Portainer Update (push) Has been cancelled
Build and Push Docker Images / Build Backend (FastAPI) (push) Has been cancelled

Bind mounts don't work on the remote Portainer host since the files
aren't present there. Instead, Dockerfile.init copies the flow YAMLs
into a dedicated image (kestra/kestra:latest base) that is built in CI
and pulled by Portainer like the other images.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 12:40:43 +00:00
parent eda3444147
commit 6ce52d833c
3 changed files with 43 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ env:
BACKEND_IMAGE_NAME: ${{ gitea.repository }}-backend
FRONTEND_IMAGE_NAME: ${{ gitea.repository }}-frontend
INTEGRATOR_IMAGE_NAME: ${{ gitea.repository }}-integrator
KESTRA_INIT_IMAGE_NAME: ${{ gitea.repository }}-kestra-init
jobs:
build-backend:
@@ -135,10 +136,47 @@ jobs:
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
build-kestra-init:
name: Build Kestra Init
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 Kestra Init Docker image
id: meta-kestra-init
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.KESTRA_INIT_IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=kestra-init-
type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/main' }}
- name: Build and push Kestra Init Docker image
uses: docker/build-push-action@v5
with:
context: ./integrator
file: ./integrator/Dockerfile.init
push: ${{ gitea.event_name != 'pull_request' }}
tags: ${{ steps.meta-kestra-init.outputs.tags }}
labels: ${{ steps.meta-kestra-init.outputs.labels }}
trigger-deployment:
name: Trigger Portainer Update
runs-on: ubuntu-latest
needs: [build-backend, build-frontend, build-integrator]
needs: [build-backend, build-frontend, build-integrator, build-kestra-init]
if: gitea.event_name != 'pull_request'
steps:
- name: Trigger Portainer stack update