Skip to content

Commit

Permalink
caps: add cap for gha cache backend
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Jul 10, 2021
1 parent be6de51 commit b1c80cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cache/remotecache/gha/gha.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions solver/pb/caps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -339,4 +341,10 @@ func init() {
Enabled: true,
Status: apicaps.CapStatusExperimental,
})

Caps.Init(apicaps.Cap{
ID: CapRemoteCacheGHA,
Enabled: true,
Status: apicaps.CapStatusExperimental,
})
}

0 comments on commit b1c80cf

Please sign in to comment.