Skip to content

fix(ci): replace free-text helm version input with dropdown#276

Open
bhavyamsharmaa wants to merge 1 commit into
crossplane-contrib:mainfrom
bhavyamsharmaa:fix/helm-release-version-dropdown
Open

fix(ci): replace free-text helm version input with dropdown#276
bhavyamsharmaa wants to merge 1 commit into
crossplane-contrib:mainfrom
bhavyamsharmaa:fix/helm-release-version-dropdown

Conversation

@bhavyamsharmaa

Copy link
Copy Markdown

Closes #208

What changed

The helm-release workflow had a plain text input for the version field. This meant anyone could type any string, including versions that do not match any real release. The only guard was a validation step that ran after the workflow started.

This PR changes the version input to type: choice so the GitHub Actions UI shows a dropdown instead of a text box. Users can only pick from the list, so it is no longer possible to enter a made-up version.

Two files are changed:

helm-release.yml - the version input type is changed from string to choice. The options list is seeded with the current 17 release tags from the repository.

sync-helm-versions.yml (new) - a workflow that keeps the dropdown list up to date. It runs automatically whenever a new release is published on GitHub. It can also be run manually. It fetches the 20 most recent release tags and rewrites the options block in helm-release.yml, then commits the result.

The existing validate-version job is kept as it is. It acts as a safety net for cases where the workflow is triggered via the API directly (e.g. gh workflow run), where a choice input does not restrict what value is passed.

How it works

When a release is published, sync-helm-versions.yml runs and updates the options list in helm-release.yml. The next time someone opens the helm-release workflow in the GitHub UI, the dropdown will show the updated list.

Testing

  • Trigger sync-helm-versions manually and verify it updates the options in helm-release.yml and commits the change.
  • Open the helm-release workflow dispatch UI and verify a dropdown appears instead of a text field.
  • Verify the existing validation step still fails correctly when triggered via the API with a bad version.

@bhavyamsharmaa bhavyamsharmaa force-pushed the fix/helm-release-version-dropdown branch from ff37da3 to d76a5d3 Compare June 12, 2026 18:10
The helm-release workflow used a plain text input for the version,
which allowed anyone to type any string, including versions that do
not exist as real releases.

This change switches the input to type: choice so only versions that
appear in the official GitHub releases can be selected. The initial
options list is seeded with the current releases.

A new sync-helm-versions workflow is added to keep the choices list
up to date. It runs automatically whenever a new release is published
and can also be triggered manually. It fetches the latest 20 release
tags and rewrites the options block in helm-release.yml.

The existing validate-version job is kept as a safety net for
workflow_dispatch calls made via the API where a choice input does
not restrict the value.

Closes crossplane-contrib#208

Signed-off-by: Bhavyam Sharma <positionbhavyamsharma@gmail.com>
@bhavyamsharmaa bhavyamsharmaa force-pushed the fix/helm-release-version-dropdown branch from d76a5d3 to 8f4dd9c Compare June 12, 2026 18:15
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.

[DEVOPS] Free text allowed for version when releasing helm

1 participant