Skip to content

Commit 647151a

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
ci: cache vcpkg artifacts
2 parents 38124b8 + 04bf00c commit 647151a

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

0 commit comments

Comments
 (0)