Skip to content

Commit d3b49db

Browse files
committed
fix up
1 parent 630fb71 commit d3b49db

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

actionsdotnetactcompat/action_cache.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ import (
1414
"path/filepath"
1515
"strings"
1616

17-
"github.com/ChristopherHX/github-act-runner/protocol"
1817
"github.com/actions-oss/act-cli/pkg/common"
18+
19+
"github.com/ChristopherHX/github-act-runner/protocol"
1920
)
2021

2122
type ActionCacheBase struct {
@@ -104,7 +105,7 @@ func fetchAction(ctx context.Context, target string, owner string, name string,
104105
if logger != nil {
105106
logger.Infof("Downloading action %v/%v (sha:%v) from %v", owner, name, resolvedSha, tarURL)
106107
}
107-
req, err := http.NewRequestWithContext(ctx, "GET", tarURL, nil)
108+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, tarURL, nil)
108109
if err != nil {
109110
return "", err
110111
}
@@ -118,7 +119,7 @@ func fetchAction(ctx context.Context, target string, owner string, name string,
118119
return "", err
119120
}
120121
defer rsp.Body.Close()
121-
if rsp.StatusCode != 200 {
122+
if rsp.StatusCode != http.StatusOK {
122123
buf := &bytes.Buffer{}
123124
io.Copy(buf, rsp.Body)
124125
return "", fmt.Errorf("Failed to download action from %v response %v", tarURL, buf.String())

actionsdotnetactcompat/launch_action_cache.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import (
55
"fmt"
66
"strings"
77

8-
"github.com/ChristopherHX/github-act-runner/protocol"
9-
"github.com/ChristopherHX/github-act-runner/protocol/launch"
108
"github.com/actions-oss/act-cli/pkg/runner"
119
"github.com/google/uuid"
10+
11+
"github.com/ChristopherHX/github-act-runner/protocol"
12+
"github.com/ChristopherHX/github-act-runner/protocol/launch"
1213
)
1314

1415
type LaunchActionCache struct {

actionsdotnetactcompat/step_converter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/actions-oss/act-cli/pkg/model"
7+
"github.com/actions-oss/act-cli/pkg/model"
88
"github.com/google/uuid"
99
"gopkg.in/yaml.v3"
1010

actionsdotnetactcompat/vss_action_cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"fmt"
66
"strings"
77

8-
"github.com/ChristopherHX/github-act-runner/protocol"
98
"github.com/actions-oss/act-cli/pkg/runner"
109
"github.com/google/uuid"
10+
11+
"github.com/ChristopherHX/github-act-runner/protocol"
1112
)
1213

1314
type VssActionCache struct {

0 commit comments

Comments
 (0)