File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ func getConfig(attrs map[string]string) (*Config, error) {
63
63
if ! ok {
64
64
scope = "buildkit"
65
65
}
66
- url , ok := attrs [attrURL ]
67
- if ! ok {
68
- return nil , errors .Errorf ("url not set for github actions cache" )
69
- }
70
66
token , ok := attrs [attrToken ]
71
67
if ! ok {
72
68
return nil , errors .Errorf ("token not set for github actions cache" )
@@ -80,12 +76,19 @@ func getConfig(attrs map[string]string) (*Config, error) {
80
76
}
81
77
apiVersionInt = int (i )
82
78
}
79
+ var url string
83
80
if apiVersionInt != 1 {
84
81
if v , ok := attrs [attrURLV2 ]; ok {
85
82
url = v
86
83
apiVersionInt = 2
87
84
}
88
85
}
86
+ if v , ok := attrs [attrURL ]; ok && url == "" {
87
+ url = v
88
+ }
89
+ if url == "" {
90
+ return nil , errors .Errorf ("url not set for github actions cache" )
91
+ }
89
92
// best effort on old clients
90
93
if apiVersionInt == 0 {
91
94
if strings .Contains (url , "results-receiver.actions.githubusercontent.com" ) {
You can’t perform that action at this time.
0 commit comments