Skip to content

Commit d28da22

Browse files
committed
should work
1 parent 0a3a013 commit d28da22

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ jobs:
217217
id: cache-opam-env
218218
uses: actions/cache/restore@v4
219219
with:
220-
path: ~/.opam
221-
key: opam-env-${{ runner.os }}-${{ hashFiles('dune-project') }}
220+
path: |
221+
${{ runner.tool_cache }}/opam
222+
~/.opam
223+
key: opam-env-v1-${{ runner.os }}-${{ hashFiles('dune-project') }}
222224

223225
- name: Use OCaml ${{matrix.ocaml_compiler}}
224226
uses: ocaml/setup-ocaml@v2
@@ -248,8 +250,10 @@ jobs:
248250
if: steps.cache-opam-env.outputs.cache-hit != 'true'
249251
uses: actions/cache/save@v4
250252
with:
251-
path: ~/.opam
252-
key: opam-env-${{ runner.os }}-${{ hashFiles('dune-project') }}
253+
path: |
254+
${{ runner.tool_cache }}/opam
255+
~/.opam
256+
key: opam-env-v1-${{ runner.os }}-${{ hashFiles('dune-project') }}
253257

254258
- name: Get OPAM path
255259
if: steps.cache-opam-env.outputs.cache-hit != 'true'
@@ -275,10 +279,9 @@ jobs:
275279
- name: Use cached OPAM env
276280
if: steps.cache-opam-env.outputs.cache-hit == 'true'
277281
run: |
278-
ls -al "$(dirname "$(cat .opam-path)")"
279-
ls -al "$(cat .opam-path)"
280-
chmod +x "$(cat .opam-path)"
281-
echo "$(dirname "$(cat .opam-path)")" >> $GITHUB_PATH
282+
OPAM_PATH="$(cat .opam-path)"
283+
chmod +x $OPAM_PATH
284+
dirname $OPAM_PATH >> $GITHUB_PATH
282285
283286
- name: Use cached OPAM env
284287
if: steps.cache-opam-env.outputs.cache-hit == 'true'

0 commit comments

Comments
 (0)