Skip to content

Commit 6a21c1f

Browse files
dschomjcheetham
authored andcommitted
Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
ci: cache vcpkg artifacts
2 parents 096dc69 + 5e88bd4 commit 6a21c1f

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
@@ -167,14 +167,10 @@ jobs:
167167
repository: 'microsoft/vcpkg'
168168
path: 'compat/vcbuild/vcpkg'
169169
- name: download vcpkg artifacts
170-
shell: powershell
171-
run: |
172-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
173-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
174-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
175-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
176-
Expand-Archive compat.zip -DestinationPath . -Force
177-
Remove-Item compat.zip
170+
uses: git-for-windows/get-azure-pipelines-artifact@v0
171+
with:
172+
repository: git/git
173+
definitionId: 9
178174
- name: add msbuild to PATH
179175
uses: microsoft/setup-msbuild@v1
180176
- name: copy dlls to root

0 commit comments

Comments
 (0)