caps: add cap for gha cache backend

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
v0.9
Tonis Tiigi 2021-03-21 22:52:40 -07:00
parent be6de5138b
commit b1c80cf0ab
2 changed files with 9 additions and 1 deletions

View File

@ -331,7 +331,7 @@ func (r *readerAt) Size() int64 {
}
func oneOffProgress(ctx context.Context, id string) func(err error) error {
pw, _, _ := progress.FromContext(ctx)
pw, _, _ := progress.NewFromContext(ctx)
now := time.Now()
st := progress.Status{
Started: &now,

View File

@ -62,6 +62,8 @@ const (
CapMetaIgnoreCache apicaps.CapID = "meta.ignorecache"
CapMetaDescription apicaps.CapID = "meta.description"
CapMetaExportCache apicaps.CapID = "meta.exportcache"
CapRemoteCacheGHA apicaps.CapID = "cache.gha"
)
func init() {
@ -339,4 +341,10 @@ func init() {
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
Caps.Init(apicaps.Cap{
ID: CapRemoteCacheGHA,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
}