diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index f9d22c1..3373cec 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -63,7 +63,8 @@ jobs: if: ${{ needs.changes.outputs.dockerfile == 'true' }} uses: ./.gitea/workflows/docker.yaml with: - push: ${{ github.event_name != 'pull_request' }} + # Explicit string, not a boolean expression (act_runner mangles bools). + push: ${{ github.event_name == 'pull_request' && 'false' || 'true' }} # Runs after docker (if docker ran). A skipped docker job is fine; a failed # one blocks this via !failure(). Re-run tests when code OR the image changed. diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml index 699af5b..27fa328 100644 --- a/.gitea/workflows/docker.yaml +++ b/.gitea/workflows/docker.yaml @@ -4,19 +4,22 @@ name: '🐳 Builder Image' # It is called by ci.yaml only when Dockerfile.builder or docs/requirements.txt # change. It runs on the host runner (NOT inside the builder container) because # it needs the Docker CLI/daemon. +# Note: `push` is a STRING ("true"/"false"), not a boolean. Gitea's act_runner +# mangles boolean inputs passed from an expression (they arrive as false), so we +# pass an explicit string and compare with == 'true' below. on: workflow_call: inputs: push: - description: 'Push the built image to the registry' - type: boolean - default: true + description: 'Push the built image to the registry ("true"/"false")' + type: string + default: 'true' workflow_dispatch: inputs: push: - description: 'Push the built image to the registry' - type: boolean - default: true + description: 'Push the built image to the registry ("true"/"false")' + type: string + default: 'true' jobs: build: @@ -48,7 +51,7 @@ jobs: . - name: Push builder image - if: ${{ inputs.push }} + if: ${{ inputs.push == 'true' }} run: | docker push gitea.tourolle.paris/dtourolle/kpnpp-builder:latest docker push gitea.tourolle.paris/dtourolle/kpnpp-builder:${{ github.sha }} diff --git a/Dockerfile.builder b/Dockerfile.builder index 7ad29c6..749f5f1 100644 --- a/Dockerfile.builder +++ b/Dockerfile.builder @@ -1,4 +1,4 @@ -# KPN++ Builder Image (CI: pipeline trigger) +# KPN++ Builder Image (CI: pipeline trigger v2) # Pre-built image with GCC, CMake, Ninja, and Python dev headers for building and testing KPN++ # Build: docker build -f Dockerfile.builder -t gitea.tourolle.paris/dtourolle/kpnpp-builder:latest . # Push: docker push gitea.tourolle.paris/dtourolle/kpnpp-builder:latest