Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
if [ -f ${build_script} ]; then
${build_script} ./apko
else
./apko build ${cfg} ${name}:build /tmp/${name}.tar --arch amd64
./apko build --offline ${cfg} ${name}:build /tmp/${name}.tar --arch amd64
./apko build ${cfg} ${name}:build /tmp/${name}.tar
./apko build --offline ${cfg} ${name}:build /tmp/${name}.tar
fi
done

Expand Down
1 change: 1 addition & 0 deletions examples/alpine-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ environment:

archs:
- amd64
- arm64
9 changes: 9 additions & 0 deletions pkg/apk/apk/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ func cacheDirFromFile(cacheFile string) string {
return filepath.Join(filepath.Dir(cacheFile), "APKINDEX")
}

if strings.HasSuffix(cacheFile, ".rsa.pub") {
return filepath.Join(filepath.Dir(cacheFile), filepath.Base(cacheFile))
}

return filepath.Dir(cacheFile)
}

Expand All @@ -381,6 +385,11 @@ func cacheFileFromEtag(cacheFile, etag string) (string, error) {
ext = ".tar.gz"
}

// Keep all the rsa.pub files under subdirectory named by full filename.
if strings.HasSuffix(cacheFile, ".rsa.pub") {
cacheDir = filepath.Join(cacheDir, filepath.Base(cacheFile))
}

absPath, err := filepath.Abs(filepath.Join(cacheDir, etag+ext))
if err != nil {
return "", err
Expand Down
Loading