Skip to content

Commit 25eac26

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
ci: cache vcpkg artifacts
2 parents 20cfc43 + 035a567 commit 25eac26

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,10 @@ jobs:
146146
repository: 'microsoft/vcpkg'
147147
path: 'compat/vcbuild/vcpkg'
148148
- name: download vcpkg artifacts
149-
shell: powershell
150-
run: |
151-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
152-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
153-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
154-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
155-
Expand-Archive compat.zip -DestinationPath . -Force
156-
Remove-Item compat.zip
149+
uses: git-for-windows/get-azure-pipelines-artifact@v0
150+
with:
151+
repository: git/git
152+
definitionId: 9
157153
- name: add msbuild to PATH
158154
uses: microsoft/setup-msbuild@v1
159155
- name: copy dlls to root

0 commit comments

Comments
 (0)