Skip to content

Make Helm chart releases conditional on tags while maintaining continuous validation#42

Merged
dkrizic merged 2 commits intomainfrom
copilot/update-chartrelease-workflow
Jan 25, 2026
Merged

Make Helm chart releases conditional on tags while maintaining continuous validation#42
dkrizic merged 2 commits intomainfrom
copilot/update-chartrelease-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 25, 2026

The chart release pipeline currently publishes to gh-pages on every main branch push. This decouples validation from releases—the pipeline now validates on all builds but only publishes when triggered by version tags.

Changes

Added validation steps (always run):

  • helm lint charts/feature
  • helm template test-release charts/feature

Added tag detection:

- name: Check if this is a tag build
  id: check_tag
  run: |
    if [[ "${{ github.ref }}" == refs/tags/* ]]; then
      echo "is_tag=true" >> $GITHUB_OUTPUT
    else
      echo "is_tag=false" >> $GITHUB_OUTPUT
    fi

Made release steps conditional with if: steps.check_tag.outputs.is_tag == 'true':

  • Prepare gh-pages branch
  • Update Chart version
  • Package Helm chart
  • Update Helm repository index
  • Commit and push to gh-pages

Behavior

  • Main branch push: Validates chart, skips release
  • Tag push (e.g., 1.2.3): Validates + publishes to gh-pages
  • Manual dispatch: Depends on ref context
Original prompt

Problem

Currently, the Helm chart release pipeline runs and publishes to gh-pages whenever changes are pushed to the main branch. This means every change to the chart files results in a new release, which is not ideal for release management.

Requested Changes

Modify .github/workflows/chartrelease.yaml to:

  1. Always run the pipeline on:

    • Pushes to main branch (when chart-related files change)
    • Tags matching *.*.*
    • Manual workflow dispatch
  2. Add validation step that runs for all builds:

    • Run helm lint charts/feature to check for chart issues
    • Run helm template test-release charts/feature to validate chart rendering
    • Display success message after validation
  3. Add conditional logic to determine if this is a tag build:

    • Add a step that checks if GITHUB_REF starts with refs/tags/
    • Set an output variable is_tag to true or false
    • Log whether this is a tag build or validation-only build
  4. Make release steps conditional - add if: steps.check_tag.outputs.is_tag == 'true' to these steps:

    • "Prepare gh-pages branch"
    • "Update Chart version"
    • "Package Helm chart"
    • "Update Helm repository index"
    • "Commit and push to gh-pages"

Expected Behavior

  • On pushes to main: Pipeline runs, validates the chart with helm lint and helm template, but does NOT publish to gh-pages
  • On tag pushes (e.g., 1.2.3): Pipeline runs, validates, updates Chart.yaml version, packages, and publishes to gh-pages
  • On manual dispatch: Behavior depends on whether it's run from a tag or branch

This ensures continuous validation of chart changes while keeping releases controlled and tied to version tags.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…rkflow

Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Helm chart release pipeline for better management Make Helm chart releases conditional on tags while maintaining continuous validation Jan 25, 2026
Copilot AI requested a review from dkrizic January 25, 2026 00:53
@dkrizic dkrizic marked this pull request as ready for review January 25, 2026 00:53
@dkrizic dkrizic merged commit 0952dd8 into main Jan 25, 2026
3 checks passed
@dkrizic dkrizic deleted the copilot/update-chartrelease-workflow branch January 25, 2026 00:53
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