Skip to content

Commit

Permalink
set the actions runner in config
Browse files Browse the repository at this point in the history
  • Loading branch information
robwhitby committed Oct 2, 2023
1 parent 77a792b commit 32bf9e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ var (

ConcourseURL = "https://concourse." + Domain

ActionsRunnerName = getEnv("HALFPIPE_ACTIONS_RUNNER", "ee-runner")

CacheDirs = []string{
"../../../var/halfpipe/cache",
"../../../halfpipe-cache", // deprecated and should be removed after a while
Expand Down
14 changes: 1 addition & 13 deletions renderers/actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package actions
import (
"fmt"
"golang.org/x/exp/slices"
"os"
"regexp"
"strings"
"time"
Expand All @@ -14,17 +13,6 @@ import (
"github.com/springernature/halfpipe/manifest"
)

var eeRunner = "ee-runner"

// allow runner name to be overridden with env var
func runnerName() string {
fromEnv := os.Getenv("HALFPIPE_ACTIONS_RUNNER")
if fromEnv != "" {
return fromEnv
}
return eeRunner
}

var globalEnv = Env{
"ARTIFACTORY_PASSWORD": githubSecrets.ArtifactoryPassword,
"ARTIFACTORY_URL": githubSecrets.ArtifactoryURL,
Expand Down Expand Up @@ -91,7 +79,7 @@ func (a *Actions) jobs(tasks manifest.TaskList, man manifest.Manifest, parent *p

job := Job{
Name: task.GetName(),
RunsOn: runnerName(),
RunsOn: config.ActionsRunnerName,
Steps: convertSecrets(steps, man.Team),
TimeoutMinutes: timeoutInMinutes(task.GetTimeout()),
Needs: needs,
Expand Down

0 comments on commit 32bf9e4

Please sign in to comment.