Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Normalize docker tags #15

Merged

Conversation

Raffy23
Copy link
Member

@Raffy23 Raffy23 commented Mar 7, 2022

This PR fixes and issue in the CI pipeline if a GitHub user has any uppercase letters in their name (e.g. Raffy23). This is done by transforming all TAGS to lowercase to ensure that all tags are lowercase.

The Problem occurs when using the following docker-build action:

     - name: Docker Build
        id: docker_build
        uses: keptn/gh-automation/.github/actions/docker-build
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TAGS: |
            ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.VERSION }}
          BUILD_ARGS: |
            version=${{ env.VERSION }}

the action will fail with

buildx failed with: error: invalid tag "ghcr.io/Raffy23/automatic-octo-telegram:0.0.2-dev": repository name must be lowercase

A successful run of the GitHub Action can be seen here: https://github.com/Raffy23/automatic-octo-telegram/actions/runs/1944722398.

Raffy23 added 2 commits March 7, 2022 11:21
Signed-off-by: Raphael Ludwig <[email protected]>
Signed-off-by: Raphael Ludwig <[email protected]>
@Raffy23 Raffy23 force-pushed the fix/normalize_docker_tags branch from c1bdcbc to ba548bd Compare March 7, 2022 10:22
Signed-off-by: Raphael Ludwig <[email protected]>
@mowies mowies changed the title fix: normalize docker tags fix: Normalize docker tags Mar 7, 2022
This reverts commit cee106d.

Signed-off-by: Raphael Ludwig <[email protected]>
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