Skip to content

Commit

Permalink
Merge pull request #192 from sapcc/SuperSandro2000-patch-1
Browse files Browse the repository at this point in the history
Use for Default group for self-hosted Actions
  • Loading branch information
Nuckal777 authored Aug 30, 2024
2 parents 0a32e02 + 1ea1f42 commit f0cc4a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions internal/core/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ const (
DefaultGoVersion = "1.23.0"
DefaultPostgresVersion = "16"
DefaultLinkerdAwaitVersion = "0.2.7"
DefaultGitHubComRunnerType = "ubuntu-latest"
DefaultGitHubComRunsOn = "ubuntu-latest"
)

var DefaultGitHubEnterpriseRunnerType = [...]string{"self-hosted"}
var DefaultGitHubEnterpriseRunsOn = map[string][]string{
"groups": {"Default"},
}

const (
CheckoutAction = "actions/checkout@v4"
Expand Down
10 changes: 5 additions & 5 deletions internal/ghworkflow/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ func pushAndPRTriggers(defaultBranch string, ignorePaths []string) eventTrigger

func baseJob(name string, isSelfHostedRunner bool) job {
var (
runnerType any
envs map[string]string
runsOn any
envs map[string]string
)

if isSelfHostedRunner {
runnerType = core.DefaultGitHubEnterpriseRunnerType
runsOn = core.DefaultGitHubEnterpriseRunsOn
envs = map[string]string{
"NODE_EXTRA_CA_CERTS": "/etc/ssl/certs/ca-certificates.crt",
}
} else {
runnerType = core.DefaultGitHubComRunnerType
runsOn = core.DefaultGitHubComRunsOn
}

return job{
Name: name,
Env: envs,
RunsOn: runnerType,
RunsOn: runsOn,
Steps: []jobStep{{
Name: "Check out code",
Uses: core.CheckoutAction,
Expand Down

0 comments on commit f0cc4a8

Please sign in to comment.