-
Notifications
You must be signed in to change notification settings - Fork 266
161 lines (159 loc) · 3.82 KB
/
validate-validator-github.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Validate GitHub User
on:
pull_request:
jobs:
validate_user:
runs-on: ubuntu-latest
permissions:
pull-requests: write
env:
VALIDATOR_LIST: (
"tiagocmachado",
"EdouardLvdl",
"gle1pn1r",
"creeea",
"veeloup",
"trader-payne",
"cryptovestor21",
"activenodes",
"staking4all",
"ilhanu",
"Suleymann85",
"ivandiazperez",
"wainach",
"Cumulo-pro",
"santosdios",
"0x-Fury",
"okannako",
"Ryabina-io",
"Gunter038",
"nodestake",
"GPvalidator",
"y3v63n",
"redref",
"jim-counter",
"travellingsoldier85",
"kooltek68",
"qubelabsio",
"DasRasyo",
"chichi13",
"jmc000",
"JejomStark",
"kj89",
"kjnodes",
"neoprom",
"mkaczanowski",
"RishiSid",
"kooltek68",
"travellingsoldier85",
"clock-workorange",
"kinrokinro",
"evgeny-garanin",
"bonsfi",
"calintatar1",
"krisboit",
"carameleon",
"quantumcore1",
"gaia",
"packetstracer",
"daniel-ck89",
"staked_blaise",
"yash_bhut",
"jmo_oo",
"kennystaked",
"AlexToTheMoon",
"richard-stakingcabin",
"vincent-stakingcabin",
"shivlim",
"BlackBlocks-io",
"WayneWayner",
"rfunduk",
"victorfrancax1",
"jennyhys",
"llPorZall",
"pops-one",
"yelllowsin",
"rooiie",
"stakemepro",
"pciavald",
"Daeinar",
"koenmtb1",
"kobigurk",
"Brightlystake",
"mabalaru",
"dantanasescu",
"imperator-co",
"easy2stake",
"suntzu93",
"spidey-169",
"larry0x",
"AviaOne",
"nodersteam",
"HoytRen",
"Aderks",
"matilote",
"ayushvtf",
"kim201212",
"puneetfinoa",
"aonif",
"bo-everstake",
"upnodedev",
"curlycrypto184",
"JoseCT-HS",
"legg",
"jamescorbett",
"frannovo",
"MilosTodorovic",
"Chainode",
"neulerfzco",
"maxzonder",
"Northa",
"Validatus-com",
"b-harvest",
"dshyionak-bd",
"macunha1",
"JackPMallon",
"fkbenjamin",
"86b",
"SimonKraus",
"ecov773",
"mgl2150",
"sibuser",
"sjors-lemniscap",
"zheli",
"MSevey",
"liamsi",
"YazzyYaz",
"evan-forbes",
"qubelabsio",
"sysrex",
"mindstyle85",
"jcstein",
"mojtaba-esk",
"eugea",
)
steps:
- uses: actions/checkout@v4
- name: Get PR author
id: author
run: echo "author=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH)" >> $GITHUB_OUTPUT
- name: Check if user is valid env
id: check_user_env
run: echo "valid=${{ contains(env.VALIDATOR_LIST, steps.author.outputs.author) }}" >> $GITHUB_OUTPUT
- name: Add comment if user is not valid
if: steps.check_user_env.outputs.valid == 'false'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '@MSevey The PR was submitted by someone not on the GitHub user validator list.'
})
- name: Fail CI if user is not valid
if: steps.check_user_env.outputs.valid == 'false'
run: exit 1