File tree Expand file tree Collapse file tree 1 file changed +5
-34
lines changed Expand file tree Collapse file tree 1 file changed +5
-34
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package actionlint
2
2
3
3
import (
4
4
"path"
5
+ "slices"
5
6
"sort"
6
7
"strings"
7
8
)
@@ -32,45 +33,15 @@ const (
32
33
func buildAllGitHubHostedRunnerLabels () []string {
33
34
l := make ([]string , 0 , len (defaultRunnerOSCompats ))
34
35
for k := range defaultRunnerOSCompats {
35
- l = append (l , k )
36
+ if ! slices .Contains (selfHostedRunnerPresetOSLabels , k ) {
37
+ l = append (l , k )
38
+ }
36
39
}
37
40
sort .Strings (l )
38
41
return l
39
42
}
40
43
41
- // https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
42
- var allGitHubHostedRunnerLabels = []string {
43
- "windows-latest" ,
44
- "windows-latest-8-cores" ,
45
- "windows-2022" ,
46
- "windows-2019" ,
47
- "ubuntu-latest" ,
48
- "ubuntu-latest-4-cores" ,
49
- "ubuntu-latest-8-cores" ,
50
- "ubuntu-latest-16-cores" ,
51
- "ubuntu-24.04" ,
52
- "ubuntu-22.04" ,
53
- "ubuntu-20.04" ,
54
- "macos-latest" ,
55
- "macos-latest-xl" ,
56
- "macos-latest-xlarge" ,
57
- "macos-latest-large" ,
58
- "macos-15-xlarge" ,
59
- "macos-15-large" ,
60
- "macos-15" ,
61
- "macos-14-xl" ,
62
- "macos-14-xlarge" ,
63
- "macos-14-large" ,
64
- "macos-14" ,
65
- "macos-13-xl" ,
66
- "macos-13-xlarge" ,
67
- "macos-13-large" ,
68
- "macos-13" ,
69
- "macos-12-xl" ,
70
- "macos-12-xlarge" ,
71
- "macos-12-large" ,
72
- "macos-12" ,
73
- }
44
+ var allGitHubHostedRunnerLabels = buildAllGitHubHostedRunnerLabels ()
74
45
75
46
// https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow#using-default-labels-to-route-jobs
76
47
var selfHostedRunnerPresetOSLabels = []string {
You can’t perform that action at this time.
0 commit comments