Skip to content

[DEVEX-1204] Add conditional build flags for app and webserver images#108

Merged
ronneseth merged 1 commit intomainfrom
DEVEX-1204-conditional-app-webserver-build
Apr 9, 2026
Merged

[DEVEX-1204] Add conditional build flags for app and webserver images#108
ronneseth merged 1 commit intomainfrom
DEVEX-1204-conditional-app-webserver-build

Conversation

@ronneseth
Copy link
Copy Markdown
Contributor

@ronneseth ronneseth commented Apr 9, 2026

Summary

  • Adds build_app_image (default true) and build_webserver_image (default true) input flags to php-laravel-build-push.yaml
  • Adds if: conditions to build-and-push-app-image and build-and-push-webserver-image jobs, matching the existing build_cli_image pattern
  • Fully backward-compatible: existing callers don't pass these inputs, so they default to true (unchanged behavior)

Context

DEVEX-1204

CLI-only repos (like marketplaces) don't have Dockerfile-app or Dockerfile-nginx. The merge-to-main workflow fails with open Dockerfile-app: no such file or directory because the app and webserver jobs always run unconditionally. The CLI job already had a build_cli_image toggle — this PR adds the same pattern for the other two jobs.

Test plan

  • Existing repos (e.g., listings) that don't pass the new inputs should build all three images as before (defaults are true)
  • CLI-only repos (e.g., marketplaces) can pass build_app_image: false and build_webserver_image: false to skip those jobs
  • Verify the skipped jobs show as "skipped" in the Actions UI (not failed)

Made with Cursor

The build-and-push-app-image and build-and-push-webserver-image jobs
always ran unconditionally, while build-and-push-cli-image was already
conditional on build_cli_image. CLI-only repos without Dockerfile-app
or Dockerfile-nginx fail on merge to main.

Add build_app_image (default true) and build_webserver_image (default
true) input flags with if: conditions, mirroring the existing
build_cli_image pattern. Fully backward-compatible — existing callers
that don't pass these inputs get the same behavior as before.

Made-with: Cursor
@ronneseth ronneseth requested a review from a team as a code owner April 9, 2026 08:23
@ronneseth ronneseth requested a review from aspencer April 9, 2026 08:23
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 9, 2026

PR Summary

Low Risk
Low risk: only adds optional workflow_call inputs and gates two GitHub Actions jobs behind if: conditions, with defaults preserving current behavior. Main risk is callers misconfiguring flags and unintentionally skipping required image builds.

Overview
Adds new workflow_call inputs build_app_image and build_webserver_image (both default true) to the reusable php-laravel-build-push.yaml workflow.

Updates the build-and-push-app-image and build-and-push-webserver-image jobs to run conditionally via if: ${{ inputs.build_app_image }} / if: ${{ inputs.build_webserver_image }}, allowing repos to skip building images when corresponding Dockerfiles don’t exist while keeping existing behavior by default.

Reviewed by Cursor Bugbot for commit f043fa0. Bugbot is set up for automated code reviews on this repo. Configure here.

@ronneseth ronneseth merged commit c88faec into main Apr 9, 2026
3 checks passed
@ronneseth ronneseth deleted the DEVEX-1204-conditional-app-webserver-build branch April 9, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants