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

CI Does Not Build with Uppercase Chars in $GITHUB_REPOSITORY variable #3

Closed
WayneLambert opened this issue Aug 4, 2020 · 2 comments

Comments

@WayneLambert
Copy link
Contributor

For anyone that has either a username or a repository name in GitHub that contains capital letters, the build job will fail. For example, my username is WayneLambert, therefore my build process failed with the following in the traceback:

Run docker-compose -f docker-compose.ci.yml build
  docker-compose -f docker-compose.ci.yml build
  shell: /bin/bash -e {0}
  env:
    WEB_IMAGE: docker.pkg.github.com/WayneLambert/django-github-digitalocean/web
    NGINX_IMAGE: docker.pkg.github.com/WayneLambert/django-github-digitalocean/nginx
Building web
invalid reference format: repository name must be lowercase
##[error]Process completed with exit code 1.

Full image below:

ci-failure

By the look of things, the variable takes the repository name as a concatenation of the username and the repository name exactly as it is.

@pattoM
Copy link

pattoM commented Sep 7, 2020

I circumvented the unnecessary variable by just hardcoding the actual url. In my case, my github username is pattoM and the capitalized m was bringing on issues.

@WayneLambert
Copy link
Contributor Author

Yes, you can hard code the value and it will then build but if your goal is to build a template for future projects, then you can replace $GITHUB_REPOSITORY with $(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]') and it will build.

@mjhea0 mjhea0 closed this as completed Jun 27, 2021
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

3 participants