File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,28 @@ jobs:
9494 echo "::error Unknown architecture/build-type triplet mapping"
9595 }
9696
97+ - name : Get vcpkg commit hash
98+ shell : pwsh
99+ run : |
100+ if ($Env:vcpkgRelease) {
101+ echo "Using vcpkg commit from repo variable..."
102+ $VCPKG_COMMIT_ID = $Env:vcpkgRelease
103+ }
104+ else {
105+ echo "Fetching latest vcpkg commit hash..."
106+ $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
107+ $VCPKG_COMMIT_ID = $commit
108+ }
109+ Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
110+ echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
111+ env :
112+ vcpkgRelease : ' ${{ vars.VCPKG_COMMIT_ID }}'
113+
97114 - uses : lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
98115 with :
99116 runVcpkgInstall : true
100117 vcpkgJsonGlob : ' **/build/vcpkg.json'
101- vcpkgGitCommitId : ' ${{ vars .VCPKG_COMMIT_ID }}'
118+ vcpkgGitCommitId : ' ${{ env .VCPKG_COMMIT_ID }}'
102119
103120 - name : ' Configure CMake'
104121 working-directory : ${{ github.workspace }}
You can’t perform that action at this time.
0 commit comments