1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2024-12-23 12:36:01 +01:00

Release v1

This commit is contained in:
Josh Gross 2019-11-04 15:13:15 -05:00
parent 21f72b1fcc
commit 9d8c7b4041
6 changed files with 10320 additions and 17 deletions

View file

@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Cache node modules - name: Cache node modules
uses: actions/cache@preview uses: actions/cache@v1
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@ -70,7 +70,7 @@ Example:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/cache@preview - uses: actions/cache@v1
id: cache id: cache
with: with:
path: path/to/dependencies path: path/to/dependencies

5163
dist/restore/index.js vendored Normal file

File diff suppressed because it is too large Load diff

5140
dist/save/index.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@
## Node - npm ## Node - npm
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@ -26,7 +26,7 @@
## Node - Yarn ## Node - Yarn
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: ~/.cache/yarn path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
@ -37,7 +37,7 @@
## 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):
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: ~/.nuget/packages path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@ -48,7 +48,7 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
## Java - Gradle ## Java - Gradle
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: ~/.gradle/caches path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
@ -59,7 +59,7 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
## Java - Maven ## Java - Maven
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@ -70,7 +70,7 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
## Swift, Objective-C - Carthage ## Swift, Objective-C - Carthage
```yaml ```yaml
uses: actions/cache@preview uses: actions/cache@v1
with: with:
path: Carthage path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
@ -81,7 +81,7 @@ uses: actions/cache@preview
## Swift, Objective-C - CocoaPods ## Swift, Objective-C - CocoaPods
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: Pods path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
@ -92,7 +92,7 @@ uses: actions/cache@preview
## Ruby - Gem ## Ruby - Gem
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: vendor/bundle path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
@ -103,7 +103,7 @@ uses: actions/cache@preview
## Go - Modules ## Go - Modules
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -113,7 +113,7 @@ uses: actions/cache@preview
## Elixir - Mix ## Elixir - Mix
```yaml ```yaml
- uses: actions/cache@preview - uses: actions/cache@v1
with: with:
path: deps path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
@ -125,17 +125,17 @@ uses: actions/cache@preview
``` ```
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@preview uses: actions/cache@v1
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@preview uses: actions/cache@v1
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build - name: Cache cargo build
uses: actions/cache@preview uses: actions/cache@v1
with: with:
path: target path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache",
"version": "0.0.1", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View file

@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache",
"version": "0.0.2", "version": "1.0.0",
"private": true, "private": true,
"description": "Cache dependencies and build outputs", "description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js", "main": "dist/restore/index.js",