- 
                Notifications
    You must be signed in to change notification settings 
- Fork 182
CI: support run docker build/test on PR #1408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ff04ce7    to
    f0863fc      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Feedback: Enhancement Suggestion for User Experience
PR #1408: CI: support run docker build/test on PR
Suggestion: Add PR Context to Build Summary
The current implementation correctly guards Docker Hub operations, but contributors may not immediately understand why certain steps are skipped
when viewing PR checks.
Proposed Enhancement
Add a conditional PR context section to the Build Summary step that appears only on PR builds:
For .github/workflows/docker-cbdb-build-containers.yml (line ~192):
# Add PR context notification
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
  echo "#### ℹ️  Pull Request Build" >> $GITHUB_STEP_SUMMARY
  echo "This is a validation build. Images are built and tested locally but **not pushed to Docker Hub** for security." >> $GITHUB_STEP_SUMMARY
  echo "" >> $GITHUB_STEP_SUMMARY
  echo "- ✅ Dockerfile syntax validated" >> $GITHUB_STEP_SUMMARY
  echo "- ✅ Multi-architecture builds tested" >> $GITHUB_STEP_SUMMARY
  echo "- ✅ TestInfra tests executed" >> $GITHUB_STEP_SUMMARY
  echo "- ⏭️  Docker Hub push skipped (requires main branch)" >> $GITHUB_STEP_SUMMARY
  echo "" >> $GITHUB_STEP_SUMMARY
fi
For .github/workflows/docker-cbdb-test-containers.yml (line ~166):
# Add PR context notification
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
  echo "#### ℹ️  Pull Request Build" >> $GITHUB_STEP_SUMMARY
  echo "This is a validation build. Images are built and tested locally but **not pushed to Docker Hub** for security." >> $GITHUB_STEP_SUMMARY
  echo "" >> $GITHUB_STEP_SUMMARY
  echo "- ✅ Dockerfile syntax validated" >> $GITHUB_STEP_SUMMARY
  echo "- ✅ Multi-architecture builds tested" >> $GITHUB_STEP_SUMMARY
  echo "- ⏭️  Docker Hub push skipped (requires main branch)" >> $GITHUB_STEP_SUMMARY
  echo "" >> $GITHUB_STEP_SUMMARY
fi
Benefits
- Clarity: Contributors immediately understand the security model
- Transparency: Makes the workflow behavior explicit in the UI
- Consistency: Matches the pattern already used elsewhere in the codebase (test workflow line 98-100)
Validation
Tested with stub workflow in isolated repository - confirmed the conditional logic works correctly and displays as expected in GitHub Actions UI.
Note: This is a nice-to-have enhancement for user experience, not required for functionality.
f0863fc    to
    a8b19a0      
    Compare
  
    Enable both docker-cbdb-build-containers and docker-cbdb-test-containers workflows to run on pull_request when files under their respective Docker paths change. Main changes: * Add pull_request triggers with path filters: - build: devops/deploy/docker/build/** - test: devops/deploy/docker/test/** Guard Docker hub login and multi-arch push steps so they run only push to refs/heads/main.
a8b19a0    to
    5a31ae8      
    Compare
  
    | 
 Great feedback! I addressed this feedback at the latest commit 513b0ef. FYI. | 
Enable both docker-cbdb-build-containers and docker-cbdb-test-containers workflows to run on pull_request when files under their respective Docker paths change.
Main changes:
Guard Docker hub login and multi-arch push steps so they run only push to refs/heads/main.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions