Skip to content

Commit 605d404

Browse files
committed
Install yq directly from GitHub release
1 parent efea9cc commit 605d404

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

.github/workflows/__build-mode-autobuild.yml

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/sync.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
import ruamel.yaml
4-
from ruamel.yaml.scalarstring import SingleQuotedScalarString
4+
from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString
55
import pathlib
66
import os
77

@@ -226,23 +226,16 @@ def writeHeader(checkStream):
226226
installYq = is_truthy(checkSpecification.get('installYq', ''))
227227

228228
if installYq:
229-
steps.append({
230-
'name': "Restore choco cache",
231-
'if': "runner.os == 'Windows'",
232-
'uses': 'actions/cache@v5',
233-
'with': {
234-
'key': 'windows-choco-cache',
235-
'path': '${{ runner.temp }}/windows-choco-cache'
236-
}
237-
})
238229
steps.append({
239230
'name': 'Install yq',
240231
'if': "runner.os == 'Windows'",
241-
'shell': 'pwsh',
242232
'env': {
243-
'CACHE_DIR': '${{ runner.temp }}/windows-choco-cache'
233+
'YQ_PATH': '${{ runner.temp }}/yq'
244234
},
245-
'run': 'choco install yq -y --stoponfirstfailure --cache-location=${env:CACHE_DIR}',
235+
'run': LiteralScalarString(
236+
'gh release download --repo mikefarah/yq --pattern "yq_windows_amd64.exe" v4.50.1 -O "$YQ_PATH/yq.exe"\n'
237+
'echo "$YQ_PATH" >> "$GITHUB_PATH"'
238+
),
246239
})
247240

248241
# If container initialisation steps are present in the check specification,

0 commit comments

Comments
 (0)