Documentation example: Haskell stack

There is an example for cabal. This is an example for stack. Both are
used in the haskell eco system.
This commit is contained in:
andys8 2020-03-29 22:54:33 +02:00
parent eb78578266
commit b5f03f8bab
2 changed files with 15 additions and 0 deletions

View file

@ -64,6 +64,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)

View file

@ -5,6 +5,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)
@ -99,6 +100,19 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
key: ${{ runner.os }}-${{ matrix.ghc }}-dist-newstyle
```
## Haskell - Stack
```yaml
- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-${{ hashFiles('**/package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-
${{ runner.os }}-stack-
```
## Java - Gradle
```yaml