Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove macos-11 and macos-11.0 runner labels support #451

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test.yaml:5:11: character '\' is invalid for branch and tag names. only special
|
5 | - 'v\d+'
| ^~~~
test.yaml:10:28: label "linux-latest" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "ubuntu-18.04", "macos-latest", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]
test.yaml:10:28: label "linux-latest" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]
|
10 | os: [macos-latest, linux-latest]
| ^~~~~~~~~~~~~
Expand Down
7 changes: 1 addition & 6 deletions rule_runner_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const (
compatUbuntu2004 runnerOSCompat = 1 << iota
compatUbuntu2204
compatUbuntu2404
compatMacOS110
compatMacOS120
compatMacOS120L
compatMacOS120XL
Expand Down Expand Up @@ -58,8 +57,6 @@ var allGitHubHostedRunnerLabels = []string{
"macos-12-large",
"macos-12",
"macos-12.0",
"macos-11",
"macos-11.0",
}

// https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow#using-default-labels-to-route-jobs
Expand Down Expand Up @@ -104,14 +101,12 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"macos-12-large": compatMacOS120L,
"macos-12": compatMacOS120,
"macos-12.0": compatMacOS120,
"macos-11": compatMacOS110,
"macos-11.0": compatMacOS110,
"windows-latest": compatWindows2022,
"windows-latest-8-cores": compatWindows2022,
"windows-2022": compatWindows2022,
"windows-2019": compatWindows2019,
"linux": compatUbuntu2404 | compatUbuntu2204 | compatUbuntu2004, // Note: "linux" does not always indicate Ubuntu. It might be Fedora or Arch or ...
"macos": compatMacOS140 | compatMacOS140L | compatMacOS140XL | compatMacOS130 | compatMacOS130L | compatMacOS130XL | compatMacOS120 | compatMacOS120L | compatMacOS120XL | compatMacOS110,
"macos": compatMacOS140 | compatMacOS140L | compatMacOS140XL | compatMacOS130 | compatMacOS130L | compatMacOS130XL | compatMacOS120 | compatMacOS120L | compatMacOS120XL,
"windows": compatWindows2022 | compatWindows2019,
}

Expand Down
8 changes: 4 additions & 4 deletions rule_runner_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func TestRuleRunnerLabelCheckLabels(t *testing.T) {
},
{
what: "simple GH-hosted macOS runner label",
labels: []string{"macos-11.0"},
labels: []string{"macos-14.0"},
},
{
what: "simple GH-hosted runner label in upper case",
labels: []string{"macOS-11"},
labels: []string{"macOS-14"},
},
{
what: "self-hosted Linux runner",
Expand Down Expand Up @@ -228,8 +228,8 @@ func TestRuleRunnerLabelCheckLabels(t *testing.T) {
},
{
what: "macOS labels conflict",
labels: []string{"macos-11", "macos-12"},
errs: []string{`label "macos-12" conflicts with label "macos-11"`},
labels: []string{"macos-13", "macos-14"},
errs: []string{`label "macos-14" conflicts with label "macos-13"`},
},
{
what: "macOS XL and normal labels conflict",
Expand Down
Loading