1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

chore: enable staticcheck (#196)

Fix places where deprecated functions/types were used.

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/196
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2025-07-26 03:55:31 +00:00 committed by earl-warren
parent 6e4a3b5127
commit b1ea5424b9
8 changed files with 41 additions and 41 deletions

View file

@ -8,12 +8,11 @@ import (
"os"
"path/filepath"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/api/types/build"
// github.com/docker/docker/builder/dockerignore is deprecated
"github.com/moby/buildkit/frontend/dockerfile/dockerignore"
"github.com/moby/go-archive"
"github.com/moby/patternmatcher"
"github.com/moby/patternmatcher/ignorefile"
"github.com/nektos/act/pkg/common"
)
@ -40,7 +39,7 @@ func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
logger.Debugf("Building image from '%v'", input.ContextDir)
tags := []string{input.ImageTag}
options := types.ImageBuildOptions{
options := build.ImageBuildOptions{
Tags: tags,
Remove: true,
Platform: input.Platform,
@ -83,7 +82,7 @@ func createBuildContext(ctx context.Context, contextDir string, relDockerfile st
var excludes []string
if err == nil {
excludes, err = dockerignore.ReadAll(f)
excludes, err = ignorefile.ReadAll(f)
if err != nil {
return nil, err
}