Skip to content

Commit

Permalink
Tweak the cache key so opam can be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Jul 17, 2024
1 parent 04e6dc7 commit 6eb790c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@ jobs:
- name: Checkout tree
uses: actions/checkout@v4

- name: Download install.ps1
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/kit-ty-kate/opam/windows-installer.debug/shell/install.ps1", ".\install.ps1")
- name: Restore opam cache
id: cache-opam
uses: actions/cache/restore@v4
with:
path: |
D:\opam\bin
D:\opamroot
key: ${{ runner.os }}-opam
key: ${{ runner.os }}-opam-hashFiles('install.ps1')

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

0 comments on commit 6eb790c

Please sign in to comment.