Skip to content

Adjust tags in image-push GHA - #80

Merged
avasilevskii merged 2 commits into
openshift-psap:mainfrom
avasilevskii:adjust-gha-image-push
May 10, 2026
Merged

Adjust tags in image-push GHA#80
avasilevskii merged 2 commits into
openshift-psap:mainfrom
avasilevskii:adjust-gha-image-push

Conversation

@avasilevskii

@avasilevskii avasilevskii commented May 6, 2026

Copy link
Copy Markdown

Preparation step for #8.
Change of image push behavior and tags:

  • Build images on main branch merges and push them with latests tag.
  • Build images on GH release and push them with stable and release tag.

Summary by CodeRabbit

  • Chores
    • Improved automated deployment process: container image workflow now automatically triggers on both code pushes to main and official release publications. Image tagging strategy enhanced to apply context-aware labels—latest with commit identifiers for development builds, stable with version numbers for production releases.

Review Change Stack

Signed-off-by: avasilev <avasilev@redhat.com>
@openshift-ci

openshift-ci Bot commented May 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mml-coder for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The CI workflow .github/workflows/image-push.yaml now triggers on push to main and on release published events (retaining manual dispatch), and replaces fixed tagging with a step that conditionally computes tags: push events get latest-prefixed tags with the short commit SHA, while release events get stable-prefixed tags with the short commit SHA and release tag name. The build and push steps now consume the computed tags output.

Changes

Image Push Workflow Tagging

Layer / File(s) Summary
Dynamic Tag Computation
.github/workflows/image-push.yaml
Added "Determine tags" step that computes a tags output based on event type. On push, tags are prefixed with latest and include the short commit SHA. On release (published), tags are prefixed with stable, include the short commit SHA, and add the release tag name.
Build and Push Integration
.github/workflows/image-push.yaml
Build step now uses the dynamically computed ${{ steps.tags.outputs.tags }} instead of hardcoded tag expression, and push step continues to publish the image with the computed tag list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • openshift-psap/fournos#3: Both PRs modify .github/workflows/image-push.yaml (build/push steps and tagging/trigger behavior).
  • openshift-psap/fournos#5: Both PRs modify the repository's container image CI workflow to update image build and tagging behavior.

Poem

🐰 A workflow now branches with each git event,
latest for pushes, stable when releases are sent,
SHA tags dance in the container stream,
Dynamic dispatching—a CI/CD dream! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Adjust tags in image-push GHA' directly and clearly summarizes the main change in the pull request—modifying tagging behavior in the image-push GitHub Action workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

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

Comment thread .github/workflows/image-push.yaml Outdated
@kpouget

kpouget commented May 6, 2026

Copy link
Copy Markdown
Collaborator

lgtm, just a minor comment related to the tag name size
(I'm not sure if ${{ github.sha }} is the full SHA, 41 chars. If yes we can truncate it)

Signed-off-by: avasilev <avasilev@redhat.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/image-push.yaml:
- Around line 22-24: The release workflow currently appends "stable" and the
release tag name to TAGS but omits the literal "release" alias; update the block
that checks if github.event_name == "release" (the if [[ "${{ github.event_name
}}" == "release" ]] clause) to also append the literal "release" token to the
TAGS variable (e.g., include "release" alongside "stable" and ${{
github.event.release.tag_name }}) so published images get the explicit "release"
tag.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 366e5049-0e21-46fe-bb25-8d6a262bebb2

📥 Commits

Reviewing files that changed from the base of the PR and between 664bf78 and eb4bcf9.

📒 Files selected for processing (1)
  • .github/workflows/image-push.yaml

Comment thread .github/workflows/image-push.yaml
@kpouget

kpouget commented May 10, 2026

Copy link
Copy Markdown
Collaborator

thanks,
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2026
@avasilevskii
avasilevskii merged commit 10103f5 into openshift-psap:main May 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants