File tree 1 file changed +22
-6
lines changed
1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,17 @@ isX86() {
14
14
fi
15
15
}
16
16
17
+ # Check if we're on a GitHub hosted runner.
18
+ # Otherwise, we are running in aws codebuild.
19
+ isGitHubRunner () {
20
+ # `:-` means "use the value of RUNNER_ENVIRONMENT if it exists, otherwise use an empty string".
21
+ if [[ " ${RUNNER_ENVIRONMENT:- } " == " github-hosted" ]]; then
22
+ return 1
23
+ else
24
+ return 0
25
+ fi
26
+ }
27
+
17
28
# print a line of the specified character
18
29
printSeparationLine () {
19
30
for (( i = 0 ; i < 80 ; i++ )) ; do
@@ -155,20 +166,25 @@ cleanPackages() {
155
166
' ^dotnet-.*'
156
167
' ^llvm-.*'
157
168
' ^mongodb-.*'
158
- ' azure-cli'
159
169
' firefox'
160
170
' libgl1-mesa-dri'
161
171
' mono-devel'
162
172
' php.*'
163
173
)
164
174
165
- if isX86 ; then
175
+ if isGithubHosted ; then
166
176
packages+=(
167
- ' google-chrome-stable'
168
- ' google-cloud-cli'
169
- ' google-cloud-sdk'
170
- ' powershell'
177
+ azure-cli
171
178
)
179
+
180
+ if isX86; then
181
+ packages+=(
182
+ ' google-chrome-stable'
183
+ ' google-cloud-cli'
184
+ ' google-cloud-sdk'
185
+ ' powershell'
186
+ )
187
+ fi
172
188
fi
173
189
174
190
sudo apt-get -qq remove -y --fix-missing " ${packages[@]} "
You can’t perform that action at this time.
0 commit comments