Skip to content

Commit

Permalink
built: 🔨 use latest tag when not version found for cache (#793)
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Zhang <kweizh@gmail.com>

Signed-off-by: Wei Zhang <kweizh@gmail.com>
  • Loading branch information
zwpaper committed Aug 18, 2022
1 parent 8225eab commit 8e17307
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/lang/ir/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,14 @@ func (g Graph) EnvString() []string {

func (g Graph) DefaultCacheImporter() (*string, error) {
// The base remote cache should work for all languages.
v := version.GetGitTagFromVersion()
if v == "" {
v = "latest"
}
res := fmt.Sprintf(
"type=registry,ref=docker.io/%s/python-cache:envd-%s",
viper.GetString(flag.FlagDockerOrganization),
version.GetGitTagFromVersion())
v)
return &res, nil
}

Expand Down

0 comments on commit 8e17307

Please sign in to comment.