Skip to content

ci(docker): chain build into deploy workflow#662

Merged
camathieu merged 1 commit into
masterfrom
ci/docker-build-deploy-chain
Mar 2, 2026
Merged

ci(docker): chain build into deploy workflow#662
camathieu merged 1 commit into
masterfrom
ci/docker-build-deploy-chain

Conversation

@camathieu
Copy link
Copy Markdown
Member

What

docker deploy now automatically builds the image if it doesn't exist on Docker Hub, removing the need to comment docker build first.

Why

Previously deploying a PR required two comments (docker build → wait → docker deploy). Now one comment does both.

Changes

  • New docker-build-reusable.yaml — reusable workflow with build+push logic
  • docker-build-pr.yaml — calls reusable, exact match trigger, permission-aware notify
  • docker-deploy-pr.yaml — checks image via docker manifest inspect, conditionally builds, then deploys
  • Exact match (trim() ==) instead of contains() for comment triggers
  • Deploy and notify jobs guarded against permission failures

Testing

  • YAML validated
  • Needs real-world testing: comment docker deploy on a PR with/without existing image

Extract Docker build+push into a reusable workflow and call it from
both docker-build-pr and docker-deploy-pr. The deploy workflow now
checks if the image exists on Docker Hub before building, so a single
"docker deploy" comment handles everything.

- Add docker-build-reusable.yaml with workflow_call trigger
- Refactor docker-build-pr to call the reusable workflow
- Refactor docker-deploy-pr: check image, build if needed, deploy
- Use exact match (trim) instead of contains for comment triggers
- Guard deploy and notify jobs against permission failures
@camathieu camathieu merged commit eccf1e7 into master Mar 2, 2026
7 checks passed
@camathieu camathieu deleted the ci/docker-build-deploy-chain branch March 7, 2026 11:12
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.

1 participant