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 @@ -99,11 +99,28 @@ jobs:
9999 echo "::error Unknown architecture/build-type triplet mapping"
100100 }
101101
102+ - name : Get vcpkg commit hash
103+ shell : pwsh
104+ run : |
105+ if ($Env:vcpkgRelease) {
106+ echo "Using vcpkg commit from repo variable..."
107+ $VCPKG_COMMIT_ID = $Env:vcpkgRelease
108+ }
109+ else {
110+ echo "Fetching latest vcpkg commit hash..."
111+ $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
112+ $VCPKG_COMMIT_ID = $commit
113+ }
114+ Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
115+ echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
116+ env :
117+ vcpkgRelease : ' ${{ vars.VCPKG_COMMIT_ID }}'
118+
102119 - uses : lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
103120 with :
104121 runVcpkgInstall : true
105122 vcpkgJsonGlob : ' **/build/vcpkg.json'
106- vcpkgGitCommitId : ' ${{ vars .VCPKG_COMMIT_ID }}'
123+ vcpkgGitCommitId : ' ${{ env .VCPKG_COMMIT_ID }}'
107124
108125 - name : ' Configure CMake'
109126 working-directory : ${{ github.workspace }}
You can’t perform that action at this time.
0 commit comments