Skip to content

fix: enable image push on manual workflow_dispatch with force_rebuild#1804

Merged
yingbull merged 2 commits into
feature/cache-build-workflowsfrom
copilot/sub-pr-1796
Jan 18, 2026
Merged

fix: enable image push on manual workflow_dispatch with force_rebuild#1804
yingbull merged 2 commits into
feature/cache-build-workflowsfrom
copilot/sub-pr-1796

Conversation

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

Addresses feedback from #1796: manual workflow_dispatch runs were building containers but never pushing to GHCR, even with force_rebuild=true.

Changes

Updated push conditions in all three build jobs (build-tomcat, build-mariadb, build-drugref):

# Before: only push on branch commits
if: steps.test.outputs.success == 'true' && github.event_name == 'push'

# After: also push on manual dispatch with force_rebuild
if: steps.test.outputs.success == 'true' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_rebuild == 'true'))

Behavior

Trigger force_rebuild Pushes to Registry
Pull request N/A No
Push to main/develop/experimental N/A Yes
Manual dispatch false No
Manual dispatch true Yes

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Summary by cubic

Clarifies image publishing rules. PR builds don’t push; merges push; maintainers can manually rebuild and publish via workflow_dispatch with force_rebuild=true.

  • Bug Fixes
    • Update push conditions in all image build jobs to allow workflow_dispatch with force_rebuild to publish.
    • Keep PR builds as build-only; merges continue to publish images.

Written for commit 332447e. Summary will update on new commits.

@coderabbitai

coderabbitai Bot commented Jan 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

…istry

Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix caching approach for container image updates fix: enable image push on manual workflow_dispatch with force_rebuild Jan 18, 2026
Copilot AI requested a review from yingbull January 18, 2026 18:00
@yingbull yingbull marked this pull request as ready for review January 18, 2026 18:09
Copilot AI review requested due to automatic review settings January 18, 2026 18:09
@yingbull yingbull merged commit 951724f into feature/cache-build-workflows Jan 18, 2026
6 of 8 checks passed
@yingbull yingbull deleted the copilot/sub-pr-1796 branch January 18, 2026 18:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where manual workflow_dispatch runs would build container images but never push them to GitHub Container Registry (GHCR), even when force_rebuild=true was specified. The fix enables maintainers to manually trigger container rebuilds and have those images published to the registry.

Changes:

  • Updated push conditions in all three container build jobs to allow pushing when triggered by workflow_dispatch with force_rebuild=true
  • Maintains existing behavior: PR builds don't push, branch commits always push, manual dispatch without force_rebuild doesn't push

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