Skip to content

Commit

Permalink
feat(docker): Adding support for ghcr.io registry
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jun 6, 2021
1 parent c0fe48c commit 737ca81
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/provider/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ func (a app) LatestVersions(repository string, patterns []string) (map[string]se
func (a app) getImageDetails(ctx context.Context, repository string) (string, string, string, error) {
parts := strings.Split(repository, "/")
if len(parts) > 2 {
return fmt.Sprintf("https://%s", parts[0]), strings.Join(parts[1:], "/"), "", nil
var token string

if parts[0] == "ghcr.io" {
token = "token"
}

return fmt.Sprintf("https://%s", parts[0]), strings.Join(parts[1:], "/"), token, nil
}

if len(parts) == 1 {
Expand Down

0 comments on commit 737ca81

Please sign in to comment.