name: PROMPT Docker CI and deployment on: push: branches: [main] paths: - '**' - '!docs/**' - '!**/*.md' - 'public/**' pull_request: paths: - '**' - '!docs/**' - '!**/*.md' - 'public/**' workflow_dispatch: jobs: verify-and-deploy: runs-on: ces-control timeout-minutes: 45 env: PROMPT_IMAGE: prompt:${{ gitea.sha }} PROMPT_TEST_IMAGE: prompt-tests:${{ gitea.sha }} RELEASE_SHA: ${{ gitea.sha }} steps: - name: Checkout uses: actions/checkout@v4 - name: Check preinstalled Docker Engine and Compose run: | set -eu command -v docker docker compose version docker info >/dev/null - name: Validate the Compose configuration run: docker compose --env-file .env.example config --quiet - name: Type check, unit tests, production build and smoke test inside Docker run: docker build --target integration -t "$PROMPT_TEST_IMAGE" . - name: Build non-root production image with bundled FFmpeg run: docker build --target runtime -t "$PROMPT_IMAGE" . - name: Test the complete isolated Docker stack run: bash scripts/integration.sh - name: Deploy the persistent Docker Compose stack if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch') run: bash scripts/deploy.sh "$RELEASE_SHA"