Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/actions/cache into tiwarish…
Browse files Browse the repository at this point in the history
…ub/cache-3-0
  • Loading branch information
Shubham Tiwari authored and GitHub committed Jul 6, 2022
2 parents aeb0157 + baed351 commit 103570a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ addAssignees: false

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- phantsure
- kotewar
- aparna-ravindra
- tiwarishub
- vsvipul
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v1.4.0
with:
assignees: phantsure,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
assignees: kotewar,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
numOfAssignee: 1
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
run: /primes.sh -d prime-numbers
```
> Note: You must use the `cache` action in your workflow before you need to use the files that might be restored from the cache. If the provided `key` doesn't match an existing cache, a new cache is automatically created if the job completes successfully.

## Implementation Examples

Every programming language and framework has its own way of caching.
Expand Down
23 changes: 23 additions & 0 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba

## Haskell - Stack

### Linux or macOS

```yaml
- uses: actions/cache@v3
name: Cache ~/.stack
Expand All @@ -240,6 +242,27 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
${{ runner.os }}-stack-work-
```

### Windows

```yaml
- uses: actions/cache@v3
name: Cache %APPDATA%\stack %LOCALAPPDATA%\Programs\stack
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- uses: actions/cache@v3
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

>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.
Expand Down

0 comments on commit 103570a

Please sign in to comment.