Skip to content

fix: improve Docker build workflow with better secret handling and debugging#128

Merged
achandrasekar merged 2 commits into
kubernetes-sigs:mainfrom
wangchen615:test-release-workflow-fix
Jun 26, 2025
Merged

fix: improve Docker build workflow with better secret handling and debugging#128
achandrasekar merged 2 commits into
kubernetes-sigs:mainfrom
wangchen615:test-release-workflow-fix

Conversation

@wangchen615
Copy link
Copy Markdown
Contributor

Changes

This PR fixes the Docker build workflow issue where the image tag was showing as 'quay.io/***/inference-perf' instead of the proper username.

Key Changes:

  • Remove docker/metadata-action@v5 to avoid secret substitution issues
  • Set image name and tags as environment variables first, then use them directly
  • Add comprehensive debugging output for environment variables
  • Directly specify Docker tags and labels in build action
  • Add validation and debug steps for better troubleshooting

Testing:

  • The workflow now shows all environment variables for debugging
  • Docker tags are constructed directly from environment variables
  • This should resolve the 'invalid reference format' error

Related Issue:

Fixes the Docker build error: 'invalid tag "quay.io/***/inference-perf:v0.1.0": invalid reference format'"
Fix #119

…bugging

- Remove docker/metadata-action to avoid secret substitution issues
- Set image name and tags as environment variables first
- Add comprehensive debugging output for environment variables
- Directly specify Docker tags and labels in build action
- Add validation and debug steps for better troubleshooting
@wangchen615 wangchen615 self-assigned this Jun 26, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wangchen615

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 26, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the Docker build workflow by addressing secret handling and debugging issues.

  • Removed the usage of docker/metadata-action@v5 to prevent secret substitution problems
  • Introduced environment variable setup and comprehensive debugging output
  • Updated tag and label specifications directly in the build action
Comments suppressed due to low confidence (1)

.github/workflows/release.yml:60

  • Consider adding a sanitization step or validation for TAG_VERSION to ensure it complies with Docker tag naming conventions.
          echo "TAG_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV

Comment thread .github/workflows/release.yml
@achandrasekar
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2025
@achandrasekar achandrasekar merged commit bad0526 into kubernetes-sigs:main Jun 26, 2025
3 of 4 checks passed
wangchen615 added a commit that referenced this pull request Jun 26, 2025
…bugging (#128)

## Changes

This PR fixes the Docker build workflow issue where the image tag was
showing as 'quay.io/***/inference-perf' instead of the proper username.

### Key Changes:
- Remove `docker/metadata-action@v5` to avoid secret substitution issues
- Set image name and tags as environment variables first, then use them
directly
- Add comprehensive debugging output for environment variables
- Directly specify Docker tags and labels in build action
- Add validation and debug steps for better troubleshooting

### Testing:
- The workflow now shows all environment variables for debugging
- Docker tags are constructed directly from environment variables
- This should resolve the 'invalid reference format' error

### Related Issue:
Fixes the Docker build error: 'invalid tag
\"quay.io/***/inference-perf:v0.1.0\": invalid reference format'"
Fix #119

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish v0.1.0 tag to quay.io

4 participants