Skip to content

Commit

Permalink
ci: try to avoid saving cache if no change and try pulling image
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Oct 21, 2024
1 parent 0fa5627 commit 3a3b9d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ jobs:
- name: Install dependencies
run: cabal build all --only-dependencies

- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
- name: Save cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v4
# https://github.com/actions/cache/blob/main/examples.md#haskell---cabal
if: ${{ !steps.cache.outputs.cache-hit
|| steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key
with:
path: |
~/.cabal/packages
Expand All @@ -76,6 +78,7 @@ jobs:
- name: Build static binary
run: |
cd release && \
docker pull ghcr.io/spex-lang/spex-static-build && \
docker run \
-v "${PWD}/..":/mnt/:ro \
-v "~/.cabal/packages":/root/.cache/cabal/packages \
Expand Down

0 comments on commit 3a3b9d1

Please sign in to comment.