LCORE-2083: Move the buildah temp space to /mnt if available for GH Actions image builds#180
Conversation
WalkthroughA new reusable GitHub Actions workflow ( Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as "Calling Workflow"
participant Runner as "GitHub Actions Runner\n(reusable workflow)"
participant Git as "Git (checkout)"
participant Buildah as "Buildah\n(multi-arch build)"
participant Quay as "Quay Registry"
Caller->>Runner: workflow_call(image_name, container_file, secrets)
Runner->>Git: checkout repository
Runner->>Runner: free disk & optionally remap /var/lib/containers -> /mnt
Runner->>Buildah: install & configure
Buildah->>Buildah: build multi-arch images (amd64, arm64)\ncreate dev tag (date+gitSHA)
Buildah->>Buildah: verify image list and `latest` manifest
alt event != pull_request
Runner->>Quay: authenticate using provided secrets
Buildah->>Quay: push `latest` and dev tags
else pull_request
Note right of Runner: skip credential validation and push\n(build-only)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
068ed57 to
7b15b77
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/build_and_push_container.yaml (1)
43-43: ⚡ Quick winPin third-party actions to commit SHAs.
On Line 43, Line 57, Line 77, and Line 98, tag-based refs are mutable. Pinning to full SHAs improves CI supply-chain integrity.
Also applies to: 57-57, 77-77, 98-98
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_and_push_container.yaml at line 43, The workflow is using tag-based refs like jlumbroso/free-disk-space@v1.3.1 (and other actions at the same locations) which are mutable; update each uses: line to pin the action to its full commit SHA instead of the semver tag (e.g., replace jlumbroso/free-disk-space@v1.3.1 with jlumbroso/free-disk-space@<full-commit-sha>) so the actions at the uses: entries are locked to an immutable commit SHA for supply-chain integrity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build_and_push_container.yaml:
- Around line 13-17: The workflow_call currently marks QUAY_REGISTRY_USERNAME
and QUAY_REGISTRY_PASSWORD as required:true which blocks forked PRs; change both
secrets to required:false and add a validation step (e.g., a job or initial step
named something like "validate-quay-creds") that runs only for non-pull_request
events to assert the secrets exist before attempting to push to Quay; use the
workflow context (github.event_name) to skip credential validation on
pull_request and fail early with a clear message when the event is not a PR and
the secrets are missing.
---
Nitpick comments:
In @.github/workflows/build_and_push_container.yaml:
- Line 43: The workflow is using tag-based refs like
jlumbroso/free-disk-space@v1.3.1 (and other actions at the same locations) which
are mutable; update each uses: line to pin the action to its full commit SHA
instead of the semver tag (e.g., replace jlumbroso/free-disk-space@v1.3.1 with
jlumbroso/free-disk-space@<full-commit-sha>) so the actions at the uses: entries
are locked to an immutable commit SHA for supply-chain integrity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e4f61265-d795-499d-9f87-94d1bc933379
📒 Files selected for processing (3)
.github/workflows/build_and_push_container.yaml.github/workflows/build_and_push_dev.yaml.github/workflows/build_and_push_dev_gpu.yaml
edf94ae to
8549679
Compare
8549679 to
571609a
Compare
|
@are-ces Could you bless this? |
Description
Move the buildah temp space to /mnt if available for GH Actions image builds
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit