Skip to content

Normalize Docker image naming in release workflow to unblock build-and-test job - #1

Merged
JayacharanR merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Jul 18, 2026
Merged

Normalize Docker image naming in release workflow to unblock build-and-test job#1
JayacharanR merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The build-and-test GitHub Actions job failed because Docker tags were derived from github.repository, which can include uppercase characters (invalid for image names). This updates the release workflow to consistently use a lowercase repository name for Docker image references.

  • Root cause addressed

    • release.yml used ${{ github.repository }} directly for image tags (e.g., JayacharanR/Clean-Backup:test), which Docker rejects.
  • Workflow changes

    • Added a normalization step in both build-and-test and publish-ghcr jobs to compute a lowercase image name via $GITHUB_ENV.
    • Switched build/test tag references to ${{ env.IMAGE_NAME_LOWER }}.
    • Switched GHCR metadata image source to ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }} for consistency.
  • Resulting behavior

    • Build/test tags and publish metadata now comply with Docker naming constraints regardless of repository casing.
- name: Normalize image name
  run: echo "IMAGE_NAME_LOWER=${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV"

# later
tags: ${{ env.IMAGE_NAME_LOWER }}:test
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'build-and-test' Normalize Docker image naming in release workflow to unblock build-and-test job Jul 18, 2026
Copilot AI requested a review from JayacharanR July 18, 2026 08:20
@JayacharanR
JayacharanR marked this pull request as ready for review July 18, 2026 08:22
Copilot AI review requested due to automatic review settings July 18, 2026 08:22

Copilot AI 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.

Pull request overview

This PR updates the release GitHub Actions workflow to prevent Docker build/test failures caused by invalid (uppercase) image tags derived from github.repository.

Changes:

  • Removes the previous IMAGE_NAME env that used ${{ github.repository }} directly.
  • Adds a normalization step in both jobs to compute IMAGE_NAME_LOWER via $GITHUB_ENV.
  • Switches build/test tags and GHCR metadata images: to use ${{ env.IMAGE_NAME_LOWER }}.

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

@JayacharanR
JayacharanR merged commit d87fe1a into main Jul 18, 2026
4 checks passed
@JayacharanR
JayacharanR deleted the copilot/fix-failing-github-actions-job branch July 18, 2026 08:32
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