Skip to content

Commit

Permalink
Remove ContainerMaxLifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
GuessWhoSamFoo committed Aug 7, 2023
1 parent 715ac6d commit 00f0139
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 2 additions & 4 deletions pkg/runner/run_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/opencontainers/selinux/go-selinux"

Check failure on line 13 in pkg/runner/run_context.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"time"

"github.com/opencontainers/selinux/go-selinux"

"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/container"
Expand Down Expand Up @@ -325,7 +323,7 @@ func (rc *RunContext) startJobContainer() common.Executor {

rc.JobContainer = container.NewContainer(&container.NewContainerInput{
Cmd: nil,
Entrypoint: []string{"/bin/sleep", fmt.Sprint(rc.Config.ContainerMaxLifetime.Round(time.Second).Seconds())},
Entrypoint: []string{"/usr/bin/tail", "-f", "/dev/null"},
WorkingDir: ext.ToContainerPath(rc.Config.Workdir),
Image: image,
Username: username,
Expand Down
5 changes: 1 addition & 4 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
log "github.com/sirupsen/logrus"

Check failure on line 7 in pkg/runner/runner.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"os"
"runtime"
"time"

log "github.com/sirupsen/logrus"

docker_container "github.com/docker/docker/api/types/container"
"github.com/nektos/act/pkg/common"
Expand Down Expand Up @@ -60,7 +58,6 @@ type Config struct {
ReplaceGheActionWithGithubCom []string // Use actions from GitHub Enterprise instance to GitHub
ReplaceGheActionTokenWithGithubCom string // Token of private action repo on GitHub.
Matrix map[string]map[string]bool // Matrix config to run
ContainerMaxLifetime time.Duration // the max lifetime of job containers
ContainerNetworkMode docker_container.NetworkMode // the network mode of job containers (the value of --network)
ValidVolumes []string // only volumes (and bind mounts) in this slice can be mounted on the job container or service containers
}
Expand Down

0 comments on commit 00f0139

Please sign in to comment.