Skip to content

Commit

Permalink
remove macos-11.0 runner label
Browse files Browse the repository at this point in the history
Although it's said `macos-11.0` is not deprecated until Dec 3, 2024 [1],
users already experienced its deprecation in Aug, 2024, see actions/runner-images#10099 (comment).

[1] https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/
  • Loading branch information
muzimuzhi committed Sep 27, 2024
1 parent a2d39cd commit 8927969
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
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-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", "macos-11.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]
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
5 changes: 1 addition & 4 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,7 +57,6 @@ var allGitHubHostedRunnerLabels = []string{
"macos-12-large",
"macos-12",
"macos-12.0",
"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 @@ -103,13 +101,12 @@ var defaultRunnerOSCompats = map[string]runnerOSCompat{
"macos-12-large": compatMacOS120L,
"macos-12": compatMacOS120,
"macos-12.0": compatMacOS120,
"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

0 comments on commit 8927969

Please sign in to comment.