Skip to content

Commit

Permalink
Merge pull request #173 from malob/add-stack-example
Browse files Browse the repository at this point in the history
Add example for Haskell Stack
  • Loading branch information
Vipul authored and GitHub committed Feb 22, 2022
2 parents eed9cfe + ea5981d commit 29dbbce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
- [Elixir - Mix](./examples.md#elixir---mix)
- [Go - Modules](./examples.md#go---modules)
- [Haskell - Cabal](./examples.md#haskell---cabal)
- [Haskell - Stack](./examples.md#haskell---stack)
- [Java - Gradle](./examples.md#java---gradle)
- [Java - Maven](./examples.md#java---maven)
- [Node - npm](./examples.md#node---npm)
Expand Down
20 changes: 20 additions & 0 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [Elixir - Mix](#elixir---mix)
- [Go - Modules](#go---modules)
- [Haskell - Cabal](#haskell---cabal)
- [Haskell - Stack](#haskell---stack)
- [Java - Gradle](#java---gradle)
- [Java - Maven](#java---maven)
- [Node - npm](#node---npm)
Expand Down Expand Up @@ -130,6 +131,25 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
key: ${{ runner.os }}-${{ matrix.ghc }}
```

## Haskell - Stack

```yaml
- uses: actions/cache@v2
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- uses: actions/cache@v2
name: Cache .stack-work
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-
```

## Java - Gradle

```yaml
Expand Down

0 comments on commit 29dbbce

Please sign in to comment.