-
Notifications
You must be signed in to change notification settings - Fork 9
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
add action to build and push images #124
add action to build and push images #124
Conversation
WalkthroughThis pull request introduces a new GitHub Actions workflow ( Changes
Sequence Diagram(s)sequenceDiagram
participant Repo as "Repository"
participant GH as "GitHub Actions"
participant Quay as "Quay.io"
Repo->>GH: Push event (tag or master branch)
GH->>GH: Checkout code
GH->>GH: Determine image tag
GH->>Quay: Login using stored credentials
GH->>Quay: Build & push bootstrap image
GH->>Quay: Build & push control plane image
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/workflows/publish_images.yaml (2)
3-10
: Review Trigger Configuration.
The workflow is set to trigger on pushes to semantic version tags and the master branch. This aligns with the PR objectives. In future, if additional branches are added, ensure that branch names are sanitized as planned.
48-54
: Typo in Control Plane Step Name.
There is a minor typo in the step name. Changing "controplane" to "controlplane" will maintain consistency with the environment variablecontrolplane_image_name
.- - name: Build and publish controplane image to Quay + - name: Build and publish controlplane image to Quay
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/publish_images.yaml
(1 hunks).github/workflows/release.yaml
(0 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/release.yaml
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Security scan
🔇 Additional comments (3)
.github/workflows/publish_images.yaml (3)
1-2
: Workflow Naming is Clear.
The workflow name "Release" correctly reflects its purpose of releasing container images.
35-40
: Approval of Quay.io Login Step.
The login step usingdocker/login-action@v3
and the use of GitHub secrets is correctly implemented.
41-47
: Approval of Bootstrap Image Build and Push.
The step for building and pushing the bootstrap image is configured properly with the correct context, tag, and build arguments.
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
TAG="${GITHUB_REF#refs/tags/}" | ||
elif [[ $GITHUB_REF == refs/headsmaster* ]]; then | ||
TAG=latest |
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.
Fix Master Branch Reference Pattern.
The shell condition in line 27 uses refs/headsmaster*
, which is incorrect. It should be updated to refs/heads/master*
to properly match the master branch.
- elif [[ $GITHUB_REF == refs/headsmaster* ]]; then
- TAG=latest
+ elif [[ $GITHUB_REF == refs/heads/master* ]]; then
+ TAG=latest
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
TAG="${GITHUB_REF#refs/tags/}" | |
elif [[ $GITHUB_REF == refs/headsmaster* ]]; then | |
TAG=latest | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
TAG="${GITHUB_REF#refs/tags/}" | |
elif [[ $GITHUB_REF == refs/heads/master* ]]; then | |
TAG=latest |
Signed-off-by: Riccardo Piccoli <rpiccoli@redhat.com>
58ba967
to
d24428b
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, rccrdpccl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
32f1040
into
openshift-assisted:master
Add an action to just push image on push on tag matching or selected branches.
For now we only push on master, once we'll introduce branches we can apply some rules to sanitize its naming.
Summary by CodeRabbit
New Features
Chores