Skip to content

Commit 3fec75c

Browse files
committed
Tweak the cache key so opam can be updated
1 parent d0d4237 commit 3fec75c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/windows.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,24 @@ jobs:
1818
- name: Checkout tree
1919
uses: actions/checkout@v4
2020

21+
- name: Download install.ps1
22+
run: |
23+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
24+
(New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/kit-ty-kate/opam/windows-installer.debug/shell/install.ps1", ".\install.ps1")
25+
2126
- name: Restore opam cache
2227
id: cache-opam
2328
uses: actions/cache/restore@v4
2429
with:
2530
path: |
2631
D:\opam\bin
2732
D:\opamroot
28-
key: ${{ runner.os }}-opam
33+
key: ${{ runner.os }}-opam-${{ hashFiles('install.ps1') }}
2934

3035
- name: Install opam
3136
if: steps.cache-opam.outputs.cache-hit != 'true'
3237
run: |
33-
Invoke-Expression "& { $(Invoke-RestMethod https://raw.githubusercontent.com/kit-ty-kate/opam/windows-installer.debug/shell/install.ps1) } -OpamBinDir 'D:\opam\bin' -NoSetPath -NoAdmin"
38+
Invoke-Expression "& ./install.ps1 -OpamBinDir 'D:\opam\bin'"
3439
3540
- name: Add opam to PATH
3641
run: |

0 commit comments

Comments
 (0)