Rename act_runner to runner

This commit is contained in:
Lunny Xiao
2026-04-25 15:47:25 -07:00
parent fbd6316928
commit 81f3d3ef3f
87 changed files with 230 additions and 229 deletions

View File

@@ -19,7 +19,7 @@ import (
"sync/atomic"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/julienschmidt/httprouter"
"github.com/sirupsen/logrus"

View File

@@ -17,7 +17,7 @@ import (
"strings"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/julienschmidt/httprouter"
)

View File

@@ -17,8 +17,8 @@ import (
"testing"
"testing/fstest"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/act_runner/act/runner"
"gitea.com/gitea/runner/act/model"
"gitea.com/gitea/runner/act/runner"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"

View File

@@ -117,7 +117,7 @@ func NewParallelExecutor(parallel int, executors ...Executor) Executor {
log.Debugf("Worker %d executing task %d", workerID, taskCount)
// Recover from panics in executors to avoid crashing the worker
// goroutine which would leave the runner process hung.
// https://gitea.com/gitea/act_runner/issues/371
// https://gitea.com/gitea/runner/issues/371
errs <- func() (err error) {
defer func() {
if r := recover(); r != nil {

View File

@@ -15,7 +15,7 @@ import (
"strings"
"sync"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"

View File

@@ -8,7 +8,7 @@ import (
"context"
"io"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/go-connections/nat"
)

View File

@@ -10,7 +10,7 @@ import (
"context"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/credentials"

View File

@@ -12,10 +12,11 @@ import (
"os"
"path/filepath"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
// github.com/docker/docker/builder/dockerignore is deprecated
"github.com/moby/buildkit/frontend/dockerfile/dockerignore"
"github.com/moby/patternmatcher"

View File

@@ -9,7 +9,7 @@ package container
import (
"context"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/docker/api/types"
)

View File

@@ -13,7 +13,7 @@ import (
"fmt"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/distribution/reference"
"github.com/docker/docker/api/types"

View File

@@ -20,8 +20,8 @@ import (
"strconv"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/filecollector"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/filecollector"
"github.com/Masterminds/semver"
"github.com/docker/cli/cli/compose/loader"

View File

@@ -15,7 +15,7 @@ import (
"testing"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"

View File

@@ -10,7 +10,7 @@ import (
"context"
"runtime"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/docker/api/types"
"github.com/pkg/errors"

View File

@@ -9,7 +9,7 @@ package container
import (
"context"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/volume"

View File

@@ -19,9 +19,9 @@ import (
"strings"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/filecollector"
"gitea.com/gitea/act_runner/act/lookpath"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/filecollector"
"gitea.com/gitea/runner/act/lookpath"
"github.com/go-git/go-billy/v5/helper/polyfill"
"github.com/go-git/go-billy/v5/osfs"

View File

@@ -12,7 +12,7 @@ import (
"io"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
)
func parseEnvFile(e Container, srcPath string, env *map[string]string) common.Executor {

View File

@@ -18,7 +18,7 @@ import (
"strconv"
"strings"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/go-git/go-git/v5/plumbing/format/gitignore"
"github.com/rhysd/actionlint"

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
)

View File

@@ -12,7 +12,7 @@ import (
"reflect"
"strings"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/rhysd/actionlint"
)

View File

@@ -8,7 +8,7 @@ import (
"math"
"testing"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
)

View File

@@ -9,8 +9,8 @@ import (
"fmt"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/common/git"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/common/git"
)
type GithubContext struct {

View File

@@ -15,7 +15,7 @@ import (
"strconv"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
log "github.com/sirupsen/logrus"
"go.yaml.in/yaml/v4"

View File

@@ -18,9 +18,9 @@ import (
"runtime"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/model"
"github.com/kballard/go-shellquote"
)

View File

@@ -11,8 +11,8 @@ import (
"strconv"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
)
func evaluateCompositeInputAndEnv(ctx context.Context, parent *RunContext, step actionStep) map[string]string {

View File

@@ -11,7 +11,7 @@ import (
"strings"
"testing"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -9,7 +9,7 @@ import (
"regexp"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
)
var commandPatternGA *regexp.Regexp

View File

@@ -11,8 +11,8 @@ import (
"os"
"testing"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
"github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"

View File

@@ -8,8 +8,8 @@ import (
"context"
"io"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"github.com/stretchr/testify/mock"
)

View File

@@ -15,10 +15,10 @@ import (
"strings"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/exprparser"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/exprparser"
"gitea.com/gitea/runner/act/model"
_ "embed"

View File

@@ -8,8 +8,8 @@ import (
"context"
"testing"
"gitea.com/gitea/act_runner/act/exprparser"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/exprparser"
"gitea.com/gitea/runner/act/model"
assert "github.com/stretchr/testify/assert"
yaml "go.yaml.in/yaml/v4"

View File

@@ -10,8 +10,8 @@ import (
"strconv"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
)
type jobInfo interface {
@@ -137,7 +137,7 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo
// if !rc.IsHostEnv(ctx) && rc.Config.ContainerNetworkMode == "" {
// // clean network in docker mode only
// // if the value of `ContainerNetworkMode` is empty string,
// // it means that the network to which containers are connecting is created by `act_runner`,
// // it means that the network to which containers are connecting is created by `runner`,
// // so, we should remove the network at last.
// networkName, _ := rc.networkName()
// logger.Infof("Cleaning up network for job %s, and network name is: %s", rc.JobName, networkName)

View File

@@ -12,9 +12,9 @@ import (
"slices"
"testing"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -16,7 +16,7 @@ import (
"path/filepath"
"strings"
"gitea.com/gitea/act_runner/act/filecollector"
"gitea.com/gitea/runner/act/filecollector"
)
type LocalRepositoryCache struct {

View File

@@ -13,7 +13,7 @@ import (
"strings"
"sync"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/runner/act/common"
"github.com/sirupsen/logrus"
"golang.org/x/term"

View File

@@ -6,7 +6,7 @@ package runner
import (
"testing"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"go.yaml.in/yaml/v4"

View File

@@ -17,9 +17,9 @@ import (
"strings"
"sync"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/common/git"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/common/git"
"gitea.com/gitea/runner/act/model"
)
func newLocalReusableWorkflowExecutor(rc *RunContext) common.Executor {

View File

@@ -23,10 +23,10 @@ import (
"strings"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/exprparser"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/exprparser"
"gitea.com/gitea/runner/act/model"
"github.com/docker/go-connections/nat"
"github.com/opencontainers/selinux/go-selinux"
@@ -383,7 +383,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
if createAndDeleteNetwork {
// clean network if it has been created by act
// if using service containers
// it means that the network to which containers are connecting is created by `act_runner`,
// it means that the network to which containers are connecting is created by `runner`,
// so, we should remove the network at last.
logger.Infof("Cleaning up network for job %s, and network name is: %s", rc.JobName, networkName)
if err := container.NewDockerNetworkRemoveExecutor(networkName)(ctx); err != nil {

View File

@@ -12,8 +12,8 @@ import (
"strings"
"testing"
"gitea.com/gitea/act_runner/act/exprparser"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/exprparser"
"gitea.com/gitea/runner/act/model"
log "github.com/sirupsen/logrus"
assert "github.com/stretchr/testify/assert"

View File

@@ -13,8 +13,8 @@ import (
"sync"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
docker_container "github.com/docker/docker/api/types/container"
log "github.com/sirupsen/logrus"

View File

@@ -16,8 +16,8 @@ import (
"strings"
"testing"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
"github.com/joho/godotenv"
log "github.com/sirupsen/logrus"

View File

@@ -13,10 +13,10 @@ import (
"strings"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/exprparser"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/exprparser"
"gitea.com/gitea/runner/act/model"
)
type step interface {

View File

@@ -15,8 +15,8 @@ import (
"path"
"path/filepath"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
)
type stepActionLocal struct {

View File

@@ -12,8 +12,8 @@ import (
"strings"
"testing"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -16,9 +16,9 @@ import (
"regexp"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/common/git"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/common/git"
"gitea.com/gitea/runner/act/model"
gogit "github.com/go-git/go-git/v5"
)

View File

@@ -14,9 +14,9 @@ import (
"testing"
"time"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/common/git"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/common/git"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -9,9 +9,9 @@ import (
"fmt"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/model"
"github.com/kballard/go-shellquote"
)

View File

@@ -10,8 +10,8 @@ import (
"io"
"testing"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -7,7 +7,7 @@ package runner
import (
"fmt"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
)
type stepFactory interface {

View File

@@ -7,7 +7,7 @@ package runner
import (
"testing"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
)

View File

@@ -11,10 +11,10 @@ import (
"runtime"
"strings"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/lookpath"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/lookpath"
"gitea.com/gitea/runner/act/model"
"github.com/kballard/go-shellquote"
)

View File

@@ -10,8 +10,8 @@ import (
"io"
"testing"
"gitea.com/gitea/act_runner/act/container"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/container"
"gitea.com/gitea/runner/act/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"

View File

@@ -8,8 +8,8 @@ import (
"context"
"testing"
"gitea.com/gitea/act_runner/act/common"
"gitea.com/gitea/act_runner/act/model"
"gitea.com/gitea/runner/act/common"
"gitea.com/gitea/runner/act/model"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"