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

mixed case organizations fail (ex: PromptExecution) #243

Open
elasticdotventures opened this issue Jan 7, 2024 · 1 comment
Open

mixed case organizations fail (ex: PromptExecution) #243

elasticdotventures opened this issue Jan 7, 2024 · 1 comment

Comments

@elasticdotventures
Copy link

The problem

build-and-push
buildx failed with: ERROR: invalid tag "ghcr.io/PromptExecution/ebook-convert:v0.0.1": repository name must be lowercase

The solution:

name: Docker

on:
  push:
    branches: [ "master" ]
    tags: [ 'v*.*.*' ]
  pull_request:
    branches: [ "master" ]

env:
  REGISTRY: ghcr.io

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      # Additional step to set lowercase image name
      - name: Set lowercase image name
        id: set_lowercase_name
        run: echo "IMAGE_NAME_LOWER=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

      # ....

      # Modify this step to use the lowercase image name
      - name: Extract Docker metadata
        id: meta
        uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}

      # Continue with the remaining steps...

Let me know if this is acceptable resolution and I'll send up a PR.

@JeroenKnoops
Copy link
Member

This is an acceptable resolution! Thanks! :)

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

No branches or pull requests

2 participants