Repository/image name should be lowercased automatically.
See original GitHub issueName components may contain lowercase letters, digits and separators. A separator is defined as a period, one or two underscores, or one or more dashes. A name component may not start or end with a separator. Src: https://docs.docker.com/engine/reference/commandline/tag/#extended-description.
I have no idea if the same rule applies to username or registry, but I have a failing build due to this. Note that repository name is feeded with ${{ github.repository }}/gateway
. Currently, there is no toLower
function in Actions.
2020-04-26T12:49:01.8839602Z ##[group]Run docker/build-push-action@v1
2020-04-26T12:49:01.8839748Z with:
2020-04-26T12:49:01.8839835Z username: 0xbkt
2020-04-26T12:49:01.8840486Z password: ***
2020-04-26T12:49:01.8840585Z repository: 0xbkt/rEdAcTeD/gateway
2020-04-26T12:49:01.8840655Z registry: docker.pkg.github.com
2020-04-26T12:49:01.8840739Z tags: latest
2020-04-26T12:49:01.8840819Z tag_with_ref: false
2020-04-26T12:49:01.8840902Z tag_with_sha: false
2020-04-26T12:49:01.8840968Z path: .
2020-04-26T12:49:01.8841048Z always_pull: false
2020-04-26T12:49:01.8841130Z add_git_labels: false
2020-04-26T12:49:01.8841225Z push: true
2020-04-26T12:49:01.8841290Z ##[endgroup]
2020-04-26T12:49:01.8867757Z ##[command]/usr/bin/docker run --name dockergithubactionsv1_68dc5e --label c27d31 --workdir /github/workspace --rm -e INPUT_USERNAME -e INPUT_PASSWORD -e INPUT_REPOSITORY -e INPUT_REGISTRY -e INPUT_TAGS -e INPUT_TAG_WITH_REF -e INPUT_TAG_WITH_SHA -e INPUT_PATH -e INPUT_DOCKERFILE -e INPUT_TARGET -e INPUT_ALWAYS_PULL -e INPUT_BUILD_ARGS -e INPUT_CACHE_FROMS -e INPUT_LABELS -e INPUT_ADD_GIT_LABELS -e INPUT_PUSH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/rEdAcTeD/rEdAcTeD":"/github/workspace" docker/github-actions:v1 "build-push"
2020-04-26T12:49:05.7322652Z Logging in to registry docker.pkg.github.com
2020-04-26T12:49:05.7555246Z WARNING! Using --password via the CLI is insecure. Use --password-stdin.
2020-04-26T12:49:05.8533235Z WARNING! Your password will be stored unencrypted in /github/home/.docker/config.json.
2020-04-26T12:49:05.8533483Z Login Succeeded
2020-04-26T12:49:05.8533831Z Configure a credential helper to remove this warning. See
2020-04-26T12:49:05.8534604Z https://docs.docker.com/engine/reference/commandline/login/#credentials-store
2020-04-26T12:49:05.8534726Z
2020-04-26T12:49:05.8547653Z Building image [docker.pkg.github.com/0xbkt/rEdAcTeD/gateway:latest]
2020-04-26T12:49:05.8721089Z invalid argument "docker.pkg.github.com/0xbkt/rEdAcTeD/gateway:latest" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
2020-04-26T12:49:05.8721637Z See 'docker build --help'.
2020-04-26T12:49:05.8734269Z Error: exit status 125
2020-04-26T12:49:05.8738409Z Usage:
2020-04-26T12:49:05.8738519Z exit status 125
2020-04-26T12:49:05.8739333Z github-actions build-push [flags]
2020-04-26T12:49:05.8739585Z
2020-04-26T12:49:05.8739769Z Flags:
2020-04-26T12:49:05.8740834Z -h, --help help for build-push
2020-04-26T12:49:05.8741420Z
Issue Analytics
- State:
- Created 3 years ago
- Reactions:24
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Docker error: invalid reference format: repository name must ...
If the name itself is invalid, the repository name must be lowercase means you use upper case characters in your registry or repository...
Read more >When building in version 3.2.1 "repository name must be ...
:smiley: This error is not super descriptive but all it means is that docker repository names must be in lower case. If your...
Read more >Creating a private repository - Amazon ECR
The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
Read more >About registries, repositories, and artifacts - Microsoft Learn
Repository names can only include lowercase alphanumeric characters, periods, dashes, underscores, and forward slashes.
Read more >Variables · Codefresh | Docs
All system provided variables will also be automatically injected to any ... the variable can create an association to an optionally dynamic image...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The comment above says this was implemented with the v2 of the docker/build-push-action. This doesn’t seem to be the case – I still get an error when the username of the owner of the repository is not all lowercase.
This is the “modern” version for setting env. (see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files )