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) {
6363 if ! ok {
6464 scope = "buildkit"
6565 }
66- url , ok := attrs [attrURL ]
67- if ! ok {
68- return nil , errors .Errorf ("url not set for github actions cache" )
69- }
7066 token , ok := attrs [attrToken ]
7167 if ! ok {
7268 return nil , errors .Errorf ("token not set for github actions cache" )
@@ -80,12 +76,19 @@ func getConfig(attrs map[string]string) (*Config, error) {
8076 }
8177 apiVersionInt = int (i )
8278 }
79+ var url string
8380 if apiVersionInt != 1 {
8481 if v , ok := attrs [attrURLV2 ]; ok {
8582 url = v
8683 apiVersionInt = 2
8784 }
8885 }
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+ }
8992 // best effort on old clients
9093 if apiVersionInt == 0 {
9194 if strings .Contains (url , "results-receiver.actions.githubusercontent.com" ) {
You can’t perform that action at this time.
0 commit comments