Skip to content

Commit db30d0e

Browse files
authored
Add ghcr.io to list of registries without nested support (#61)
* Add ghcr.io to list of registries without nested support Closes #60 * Add GHCR to README and fix gofmt
1 parent 41037af commit db30d0e

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ If the `target` registry does _not_ support nested paths, only the base path of
7474
mycompany.com/myteam/prometheus-operator:v0.40.0
7575
```
7676

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

7979
## Usage
8080

internal/manifest/manifest.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,11 @@ func hostSupportsNestedRepositories(host string) bool {
366366
return false
367367
}
368368

369+
// GHCR.io
370+
if strings.Contains(host, "ghcr.io") {
371+
return false
372+
}
373+
369374
// Docker Registry (Docker Hub)
370375
// An empty host is assumed to be Docker Hub.
371376
if strings.Contains(host, "docker.io") || host == "" {

0 commit comments

Comments
 (0)