Skip to content

Commit

Permalink
Add ghcr.io to list of registries without nested support (#61)
Browse files Browse the repository at this point in the history
* Add ghcr.io to list of registries without nested support

Closes #60

* Add GHCR to README and fix gofmt
  • Loading branch information
mnasiadka committed Feb 22, 2022
1 parent 41037af commit db30d0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -74,7 +74,7 @@ If the `target` registry does _not_ support nested paths, only the base path of
mycompany.com/myteam/prometheus-operator:v0.40.0
```

**Registries that do not support nested paths:** Docker Hub, Quay.io
**Registries that do not support nested paths:** Docker Hub, GitHub Container Registry, Quay.io

## Usage

Expand Down
5 changes: 5 additions & 0 deletions internal/manifest/manifest.go
Expand Up @@ -366,6 +366,11 @@ func hostSupportsNestedRepositories(host string) bool {
return false
}

// GHCR.io
if strings.Contains(host, "ghcr.io") {
return false
}

// Docker Registry (Docker Hub)
// An empty host is assumed to be Docker Hub.
if strings.Contains(host, "docker.io") || host == "" {
Expand Down

0 comments on commit db30d0e

Please sign in to comment.