Skip to content

chore: Trigger the chart releaser workflow on both main and release branches - #192

Merged
rm3l merged 1 commit into
redhat-developer:mainfrom
rm3l:chore/trigger_chart_releaser_action_on_release_branches_too
Jul 17, 2025
Merged

chore: Trigger the chart releaser workflow on both main and release branches#192
rm3l merged 1 commit into
redhat-developer:mainfrom
rm3l:chore/trigger_chart_releaser_action_on_release_branches_too

Conversation

@rm3l

@rm3l rm3l commented Jul 17, 2025

Copy link
Copy Markdown
Member

Description of the change

This makes it easier to test upstream releases of the chart

Which issue(s) does this PR fix or relate to

How to test changes / Special notes to the reviewer

Tests done in https://github.com/rm3l/rhdh-chart/releases

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes. The pre-commit Workflow will do this automatically for you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

Summary by Sourcery

Extend the Helm chart releaser workflow to run on release branches as well as main, conditionally mark the main branch release as latest, and tidy up the releaser config file.

CI:

  • Trigger the chart-releaser workflow on branch patterns matching release-1.* in addition to main
  • Pass a mark_as_latest flag to the chart-releaser action only when running on main

Chores:

  • Remove an extraneous blank line from cr.yaml

…ranches too

This makes it easier to test upstream releases of the chart
@sourcery-ai

sourcery-ai Bot commented Jul 17, 2025

Copy link
Copy Markdown

Reviewer's Guide

Updated GitHub Actions chart releaser workflow to trigger on main and release branches, conditionally mark main releases as latest, and cleaned up the cr.yaml config.

File-Level Changes

Change Details Files
Extend workflow triggers to include release branches
  • Added 'release-1.[0-9]+' to push trigger branches
.github/workflows/release.yaml
Add conditional 'latest' marking for main branch releases
  • Introduced mark_as_latest input based on branch ref
.github/workflows/release.yaml
Clean up chart releaser configuration
  • Removed stray dash line in cr.yaml
cr.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

Copy link
Copy Markdown

@rm3l

rm3l commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

/cherry-pick release-1.7

@openshift-cherrypick-robot

Copy link
Copy Markdown

@rm3l: once the present PR merges, I will cherry-pick it on top of release-1.7 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sourcery-ai sourcery-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.

Hey @rm3l - I've reviewed your changes - here's some feedback:

  • The branch filter 'release-1.[0-9]+' uses a regex-like pattern but GitHub Actions only supports glob patterns—consider replacing it with something like 'release-1.*' to catch all release branches.
  • If you want chart releases to flow from version tags instead of branch pushes, consider adding a push: tags: ['v*'] trigger so the releaser action runs on new semver tags as well.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The branch filter 'release-1.[0-9]+' uses a regex-like pattern but GitHub Actions only supports glob patterns—consider replacing it with something like 'release-1.*' to catch all release branches.
- If you want chart releases to flow from version tags instead of branch pushes, consider adding a push: tags: ['v*'] trigger so the releaser action runs on new semver tags as well.

## Individual Comments

### Comment 1
<location> `.github/workflows/release.yaml:7` </location>
<code_context>
   push:
     branches:
       - main
+      - release-1.[0-9]+
     paths:
       - "charts/**"
</code_context>

<issue_to_address>
The branch pattern may not match as intended in GitHub Actions.

GitHub Actions uses glob patterns, not full regex. 'release-1.[0-9]+' won't match as intended; use 'release-1.*' or list branches explicitly to cover all versions.
</issue_to_address>

### Comment 2
<location> `.github/workflows/release.yaml:40` </location>
<code_context>
         uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
         with:
           config: cr.yaml
+          mark_as_latest: ${{ github.ref == 'refs/heads/main' }}
         env:
           CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
</code_context>

<issue_to_address>
Boolean expression may not yield the expected string value.

Check the chart-releaser-action documentation to confirm whether 'mark_as_latest' expects a boolean or a specific string, as GitHub Actions may coerce types unexpectedly.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
          mark_as_latest: ${{ github.ref == 'refs/heads/main' }}
=======
          mark_as_latest: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml
@rm3l rm3l changed the title chore: Trigger the chart releaser workflow on both main and release branches too chore: Trigger the chart releaser workflow on both main and release branches Jul 17, 2025
@rm3l
rm3l merged commit 29203c1 into redhat-developer:main Jul 17, 2025
7 of 8 checks passed
@rm3l
rm3l deleted the chore/trigger_chart_releaser_action_on_release_branches_too branch July 17, 2025 16:40
@openshift-cherrypick-robot

Copy link
Copy Markdown

@rm3l: new pull request created: #193

Details

In response to this:

/cherry-pick release-1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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.

2 participants