Skip to content

ci: fix image tag to use version input when triggered via workflow_di…#108

Merged
kupratyu-splunk merged 3 commits into
mainfrom
make_customers_exp_better
Jun 15, 2026
Merged

ci: fix image tag to use version input when triggered via workflow_di…#108
kupratyu-splunk merged 3 commits into
mainfrom
make_customers_exp_better

Conversation

@kupratyu-splunk

Copy link
Copy Markdown
Collaborator

…spatch

When triggered by workflow_dispatch, GITHUB_REF_NAME is the branch name (main), not the tag — causing docker/metadata-action to produce 'latest' instead of the release version. Now prefers inputs.new_operator_version when set, falling back to GITHUB_REF_NAME for tag-triggered runs. Also passes the resolved version explicitly to metadata-action semver tags so they work for both trigger types.

Description

Related Issues

  • Related to #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test improvement
  • CI/CD improvement
  • Chore (dependency updates, etc.)

Changes Made

Testing Performed

  • Unit tests pass (make test)
  • Linting passes (make lint)
  • Integration tests pass (if applicable)
  • E2E tests pass (if applicable)
  • Manual testing performed

Test Environment

  • Kubernetes Version:
  • Cloud Provider:
  • Deployment Method:

Test Steps

Documentation

  • Updated inline code comments
  • Updated README.md (if adding features)
  • Updated API documentation
  • Updated deployment guides
  • Updated CHANGELOG.md
  • No documentation needed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have updated the Helm chart version (if applicable)
  • I have updated CRD schemas (if applicable)

Breaking Changes

Impact:

Migration Path:

Screenshots/Recordings

Additional Notes

Reviewer Notes

Please pay special attention to:


Commit Message Convention: This PR follows Conventional Commits

…spatch

When triggered by workflow_dispatch, GITHUB_REF_NAME is the branch name (main),
not the tag — causing docker/metadata-action to produce 'latest' instead of the
release version. Now prefers inputs.new_operator_version when set, falling back
to GITHUB_REF_NAME for tag-triggered runs. Also passes the resolved version
explicitly to metadata-action semver tags so they work for both trigger types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 15, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the release workflow’s version resolution so Docker image semver tags are generated correctly when the workflow is triggered via workflow_dispatch/workflow_call (where GITHUB_REF_NAME is a branch name, not a tag).

Changes:

  • Resolve the release version by preferring inputs.new_operator_version when provided, otherwise falling back to GITHUB_REF_NAME.
  • Pass the resolved version explicitly into docker/metadata-action semver tagging rules so semver tags work across trigger types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-package-helm.yml
Comment thread .github/workflows/release-package-helm.yml Outdated
kupratyu-splunk and others added 2 commits June 15, 2026 20:22
build-and-push-images stripped the leading 'v' but the package job used
inputs.new_operator_version verbatim, so a v-prefixed input would produce
divergent versions between image tags and Helm chart versions, potentially
failing SemVer validation. Apply the same #v strip in the package job.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ed v prefix

Hardcoding v in value=v\${{...}} risked producing vv1.2.3 if the version step
ever changed. docker/metadata-action handles leading-v normalization itself,
so pass the bare version output directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kupratyu-splunk kupratyu-splunk merged commit e096fed into main Jun 15, 2026
11 checks passed
@kupratyu-splunk kupratyu-splunk deleted the make_customers_exp_better branch June 15, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +83 to 90
# Prefer explicit input (workflow_dispatch / workflow_call), fall back to tag ref
INPUT_VERSION="${{ inputs.new_operator_version }}"
if [[ -n "${INPUT_VERSION}" ]]; then
VERSION="${INPUT_VERSION#v}"
else
VERSION="${GITHUB_REF_NAME#v}"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
Comment on lines 168 to +171
elif [ -n "${{ inputs.new_operator_version }}" ]; then
# Use input version (for workflow_call)
# Use input version (for workflow_call / workflow_dispatch), strip leading v
VERSION="${{ inputs.new_operator_version }}"
VERSION="${VERSION#v}"
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.

3 participants