mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-06 03:55:52 +00:00
Alphabetise examples (#52)
This commit is contained in:
parent
5d3ad75a2b
commit
5f4d4d4555
1 changed files with 57 additions and 57 deletions
114
examples.md
114
examples.md
|
@ -1,38 +1,16 @@
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
- [Node - npm](#node---npm)
|
|
||||||
- [Node - Yarn](#node---yarn)
|
|
||||||
- [C# - Nuget](#c---nuget)
|
- [C# - Nuget](#c---nuget)
|
||||||
|
- [Elixir - Mix](#elixir---mix)
|
||||||
|
- [Go - Modules](#go---modules)
|
||||||
- [Java - Gradle](#java---gradle)
|
- [Java - Gradle](#java---gradle)
|
||||||
- [Java - Maven](#java---maven)
|
- [Java - Maven](#java---maven)
|
||||||
|
- [Node - npm](#node---npm)
|
||||||
|
- [Node - Yarn](#node---yarn)
|
||||||
|
- [Ruby - Gem](#ruby---gem)
|
||||||
|
- [Rust - Cargo](#rust---cargo)
|
||||||
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
||||||
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
||||||
- [Ruby - Gem](#ruby---gem)
|
|
||||||
- [Go - Modules](#go---modules)
|
|
||||||
- [Elixir - Mix](#elixir---mix)
|
|
||||||
- [Rust - Cargo](#rust---cargo)
|
|
||||||
|
|
||||||
## Node - npm
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: node_modules
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
```
|
|
||||||
|
|
||||||
## Node - Yarn
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/yarn
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
```
|
|
||||||
|
|
||||||
## C# - Nuget
|
## C# - Nuget
|
||||||
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
||||||
|
@ -46,6 +24,27 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
||||||
${{ runner.os }}-nuget-
|
${{ runner.os }}-nuget-
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Elixir - Mix
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: deps
|
||||||
|
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-mix-
|
||||||
|
```
|
||||||
|
|
||||||
|
## Go - Modules
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
```
|
||||||
|
|
||||||
## Java - Gradle
|
## Java - Gradle
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -68,26 +67,26 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
||||||
${{ runner.os }}-maven-
|
${{ runner.os }}-maven-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Swift, Objective-C - Carthage
|
## Node - npm
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: Carthage
|
path: node_modules
|
||||||
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-carthage-
|
${{ runner.os }}-node-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Swift, Objective-C - CocoaPods
|
## Node - Yarn
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: Pods
|
path: ~/.cache/yarn
|
||||||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pods-
|
${{ runner.os }}-yarn-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Ruby - Gem
|
## Ruby - Gem
|
||||||
|
@ -101,27 +100,6 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
||||||
${{ runner.os }}-gem-
|
${{ runner.os }}-gem-
|
||||||
```
|
```
|
||||||
|
|
||||||
## Go - Modules
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
```
|
|
||||||
|
|
||||||
## Elixir - Mix
|
|
||||||
```yaml
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: deps
|
|
||||||
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-mix-
|
|
||||||
```
|
|
||||||
|
|
||||||
## Rust - Cargo
|
## Rust - Cargo
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -141,3 +119,25 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Swift, Objective-C - Carthage
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: Carthage
|
||||||
|
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-carthage-
|
||||||
|
```
|
||||||
|
|
||||||
|
## Swift, Objective-C - CocoaPods
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: Pods
|
||||||
|
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pods-
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue