chore: update configuration files and improve linting for Windows
Some checks failed
Codespell / Check for spelling errors (push) Has been cancelled
promote / promote (push) Has been cancelled

- Added `go1.24.0.linux-amd64.tar.gz` to `.gitignore`.
- Removed unnecessary newline in `.mergify.yml`.
- Updated `codecov.yml` to correct indentation for ignored files.
- Enhanced `Makefile` to support linting on Windows.
- Adjusted `.github/dependabot.yml` for proper indentation.
- Fixed string quotes in `.github/workflows/checks.yml`.
- Modified `pkg/container/util_windows.go` to ignore unused parameter.
- Updated error handling in `pkg/lookpath/lp_windows.go`.
- Refactored `pkg/runner/step_action_remote.go` to improve URL handling.
- Updated `pkg/runner/hashfiles/index.js` with significant changes for better performance and structure.
This commit is contained in:
2025-08-03 04:28:08 +07:00
parent bf8e52ba71
commit ed08d1dcb4
10 changed files with 5673 additions and 4730 deletions

View File

@@ -50,7 +50,6 @@ func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
}
github := sar.getGithubContext(ctx)
sar.remoteAction.URL = github.ServerURL
if sar.remoteAction.IsCheckout() && isLocalCheckout(github, sar.Step) && !sar.RunContext.Config.NoSkipCheckout {
common.Logger(ctx).Debugf("Skipping local actions/checkout because workdir was already copied")
@@ -111,7 +110,7 @@ func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
URL: sar.remoteAction.CloneURL(),
Ref: sar.remoteAction.Ref,
Dir: actionDir,
Token: github.Token,
Token: "",
OfflineMode: sar.RunContext.Config.ActionOfflineMode,
})
var ntErr common.Executor
@@ -270,6 +269,26 @@ func (ra *remoteAction) IsCheckout() bool {
}
func newRemoteAction(action string) *remoteAction {
// support http(s)://host/owner/repo@v3
for _, schema := range []string{"https://", "http://"} {
if strings.HasPrefix(action, schema) {
splits := strings.SplitN(strings.TrimPrefix(action, schema), "/", 2)
if len(splits) != 2 {
return nil
}
ret := parseAction(splits[1])
if ret == nil {
return nil
}
ret.URL = schema + splits[0]
return ret
}
}
return parseAction(action)
}
func parseAction(action string) *remoteAction {
// GitHub's document[^] describes:
// > We strongly recommend that you include the version of
// > the action you are using by specifying a Git ref, SHA, or Docker tag number.
@@ -285,7 +304,7 @@ func newRemoteAction(action string) *remoteAction {
Repo: matches[2],
Path: matches[4],
Ref: matches[6],
URL: "https://github.com",
URL: "",
}
}