Compare commits

...

31 Commits

Author SHA1 Message Date
4b0cf6cc46 Merge pull request #769 from actions/users/ashwinsangem/bump_major_version
Bumped up to a major version(v3.0.0)
2022-03-21 13:56:53 +05:30
60c606a2b4 Update licensed files 2022-03-21 12:01:49 +05:30
b6e9a919a7 Revert "Updated to the latest version."
This reverts commit c842503583.
2022-03-21 04:56:07 +00:00
c842503583 Updated to the latest version. 2022-03-21 04:53:37 +00:00
2b7da2a62c Bumped up to a major version. 2022-03-21 04:42:02 +00:00
deae296ab3 Merge pull request #651 from magnetikonline/fix-golang-windows-example
Fix Golang windows example - updated `README.md` test badge markdown.
2022-03-09 18:22:38 +05:30
c7c46bcb6d Merge pull request #707 from duxtland/main
Add Deno cache example
2022-02-24 15:51:48 +05:30
6535c5fb5f Regenerated examples.md TOC 2022-02-24 16:36:38 +11:00
3fdafa472e Update GitHub Actions status badge markdown in README.md 2022-02-24 16:32:52 +11:00
341e6d75d9 Merge branch 'actions:main' into fix-golang-windows-example 2022-02-24 16:28:28 +11:00
3fe001f5ca chore: add Deno cache example to readme 2022-02-23 16:18:41 -05:00
ab4bea262c Merge pull request #567 from yuichkun/fix-typo-in-lerna-example
Fix typo of cache path in Lerna example
2022-02-23 11:24:07 +05:30
7772fcab79 remove unnecessary sub directory from search path 2022-02-23 12:39:46 +09:00
6c2ab9416b Merge pull request #747 from malob/add-stack-example
Add example for Haskell Stack
2022-02-23 02:21:45 +05:30
2c7b30f330 Add example for Haskell Stack 2022-02-22 10:21:09 -08:00
73cb7e0405 Merge pull request #742 from actions/node-update
Update node version, @types/node and some outdated dependencies
2022-02-16 11:09:30 +05:30
757c5a8ca4 Update deps 2022-02-15 16:44:17 +05:30
4e817c1f42 Update to node16
Node 12 has an end of life on April 30, 2022.

This PR updates the default runtime to [node16](https://github.blog/changelog/2021-12-10-github-actions-github-hosted-runners-now-run-node-js-16-by-default/), rather then node12. 

This is supported on all Actions Runners v2.285.0 or later.
2022-02-15 16:38:00 +05:30
72d1e4fdff Merge pull request #730 from actions/up-dep2
Update actions/cache package
2022-02-09 10:39:42 +05:30
8e70c71aee Update licenses for packages 2022-02-08 22:23:08 +05:30
4d3516739c Update build files 2022-02-08 16:33:33 +00:00
9c2f1a93d4 Update actions/cache package 2022-02-08 16:28:23 +00:00
5df1ae880d Merge pull request #727 from ygnoh/patch-1
Fix test description
2022-02-07 11:30:27 +05:30
45bb0b1552 Fix test description 2022-02-07 14:20:40 +09:00
b32c91dfec Merge pull request #724 from actions/resolve-dep
Resolve dependabot alerts
2022-02-01 11:05:06 +05:30
de7c17c6a9 chore: add Deno cache example 2022-01-15 19:33:29 -05:00
447f0fd1d3 Chomp some markdown whitespace 2021-09-26 22:10:48 +10:00
47e8bd685f Small fix to README.md examples link 2021-09-26 22:10:29 +10:00
795a8f09a9 Fixed Windows Golang cache paths in example 2021-09-26 22:05:48 +10:00
4762de4681 simplify path in lerna example 2021-04-21 02:47:03 +09:00
12ed05f49a Fix typo of cache path in Lerna example 2021-04-17 12:35:30 +09:00
21 changed files with 8158 additions and 6922 deletions

View File

@ -1,9 +1,9 @@
--- ---
name: "@actions/cache" name: "@actions/cache"
version: 1.0.8 version: 1.0.10
type: npm type: npm
summary: Actions cache lib summary:
homepage: https://github.com/actions/toolkit/tree/main/packages/cache homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE.md - sources: LICENSE.md

View File

@ -1,9 +1,9 @@
--- ---
name: "@actions/exec" name: "@actions/exec"
version: 1.1.0 version: 1.1.1
type: npm type: npm
summary: Actions exec lib summary:
homepage: https://github.com/actions/toolkit/tree/main/packages/exec homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE.md - sources: LICENSE.md

View File

@ -1,9 +1,9 @@
--- ---
name: "@actions/io" name: "@actions/io"
version: 1.1.1 version: 1.1.2
type: npm type: npm
summary: Actions io lib summary:
homepage: https://github.com/actions/toolkit/tree/main/packages/io homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE.md - sources: LICENSE.md

View File

@ -1,9 +1,9 @@
--- ---
name: "@azure/core-asynciterator-polyfill" name: "@azure/core-asynciterator-polyfill"
version: 1.0.0 version: 1.0.2
type: npm type: npm
summary: Polyfill for IE/Node 8 for Symbol.asyncIterator summary:
homepage: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-asynciterator-polyfill homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,6 +1,6 @@
--- ---
name: "@azure/core-http" name: "@azure/core-http"
version: 2.2.2 version: 2.2.4
type: npm type: npm
summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client
libraries generated using AutoRest libraries generated using AutoRest

View File

@ -1,10 +1,9 @@
--- ---
name: "@azure/core-lro" name: "@azure/core-lro"
version: 2.2.1 version: 2.2.4
type: npm type: npm
summary: Isomorphic client library for supporting long-running operations in node.js summary:
and browser. homepage:
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-lro/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,6 +1,6 @@
--- ---
name: "@azure/core-paging" name: "@azure/core-paging"
version: 1.2.0 version: 1.2.1
type: npm type: npm
summary: Core types for paging async iterable iterators summary: Core types for paging async iterable iterators
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md

View File

@ -1,10 +1,9 @@
--- ---
name: "@azure/ms-rest-js" name: "@azure/ms-rest-js"
version: 2.6.0 version: 2.6.1
type: npm type: npm
summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client summary:
libraries generated using AutoRest homepage:
homepage: https://github.com/Azure/ms-rest-js
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,9 +1,9 @@
--- ---
name: "@azure/storage-blob" name: "@azure/storage-blob"
version: 12.8.0 version: 12.9.0
type: npm type: npm
summary: Microsoft Azure Storage SDK for JavaScript - Blob summary:
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/ homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,9 +1,9 @@
--- ---
name: "@opentelemetry/api" name: "@opentelemetry/api"
version: 1.0.3 version: 1.1.0
type: npm type: npm
summary: Public API for OpenTelemetry summary:
homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme homepage:
license: apache-2.0 license: apache-2.0
licenses: licenses:
- sources: LICENSE - sources: LICENSE
@ -218,10 +218,6 @@ licenses:
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE [license-url]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg
[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api
[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-api.svg?type=dev
[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-api?type=dev
[npm-url]: https://www.npmjs.com/package/@opentelemetry/api [npm-url]: https://www.npmjs.com/package/@opentelemetry/api
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg
[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md [docs-tracing]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md

View File

@ -1,9 +1,9 @@
--- ---
name: "@types/node-fetch" name: "@types/node-fetch"
version: 2.5.12 version: 2.6.1
type: npm type: npm
summary: TypeScript definitions for node-fetch summary:
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,9 +1,9 @@
--- ---
name: "@types/node" name: "@types/node"
version: 12.20.37 version: 16.11.26
type: npm type: npm
summary: TypeScript definitions for Node.js summary:
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE

View File

@ -1,6 +1,6 @@
--- ---
name: node-fetch name: node-fetch
version: 2.6.6 version: 2.6.7
type: npm type: npm
summary: A light-weight module that brings window.fetch to node.js summary: A light-weight module that brings window.fetch to node.js
homepage: https://github.com/bitinn/node-fetch homepage: https://github.com/bitinn/node-fetch

View File

@ -2,7 +2,7 @@
This action allows caching dependencies and build outputs to improve workflow execution time. This action allows caching dependencies and build outputs to improve workflow execution time.
<a href="https://github.com/actions/cache/actions?query=workflow%3ATests"><img alt="GitHub Actions status" src="https://github.com/actions/cache/workflows/Tests/badge.svg?branch=main&event=push"></a> [![Tests](https://github.com/actions/cache/actions/workflows/workflow.yml/badge.svg)](https://github.com/actions/cache/actions/workflows/workflow.yml)
## Documentation ## Documentation
@ -88,11 +88,13 @@ Every programming language and framework has its own way of caching.
See [Examples](examples.md) for a list of `actions/cache` implementations for use with: See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
- [C# - Nuget](./examples.md#c---nuget) - [C# - NuGet](./examples.md#c---nuget)
- [D - DUB](./examples.md#d---dub) - [D - DUB](./examples.md#d---dub)
- [Deno](./examples.md#deno)
- [Elixir - Mix](./examples.md#elixir---mix) - [Elixir - Mix](./examples.md#elixir---mix)
- [Go - Modules](./examples.md#go---modules) - [Go - Modules](./examples.md#go---modules)
- [Haskell - Cabal](./examples.md#haskell---cabal) - [Haskell - Cabal](./examples.md#haskell---cabal)
- [Haskell - Stack](./examples.md#haskell---stack)
- [Java - Gradle](./examples.md#java---gradle) - [Java - Gradle](./examples.md#java---gradle)
- [Java - Maven](./examples.md#java---maven) - [Java - Maven](./examples.md#java---maven)
- [Node - npm](./examples.md#node---npm) - [Node - npm](./examples.md#node---npm)

View File

@ -26,7 +26,7 @@ test("isGhes returns true if server url is not github.com", () => {
} }
}); });
test("isGhes returns true when server url is github.com", () => { test("isGhes returns false when server url is github.com", () => {
try { try {
process.env["GITHUB_SERVER_URL"] = "http://github.com"; process.env["GITHUB_SERVER_URL"] = "http://github.com";
expect(actionUtils.isGhes()).toBe(false); expect(actionUtils.isGhes()).toBe(false);

View File

@ -18,7 +18,7 @@ outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key' description: 'A boolean value to indicate an exact match was found for the primary key'
runs: runs:
using: 'node12' using: 'node16'
main: 'dist/restore/index.js' main: 'dist/restore/index.js'
post: 'dist/save/index.js' post: 'dist/save/index.js'
post-if: 'success()' post-if: 'success()'

5234
dist/restore/index.js vendored

File diff suppressed because it is too large Load Diff

5234
dist/save/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,22 @@
- [D - DUB](#d---dub) - [D - DUB](#d---dub)
- [POSIX](#posix) - [POSIX](#posix)
- [Windows](#windows) - [Windows](#windows)
- [Elixir - Mix](#elixir---mix) - [Deno](#deno)
- [Go - Modules](#go---modules)
- [Linux](#linux) - [Linux](#linux)
- [macOS](#macos) - [macOS](#macos)
- [Windows](#windows-1) - [Windows](#windows-1)
- [Elixir - Mix](#elixir---mix)
- [Go - Modules](#go---modules)
- [Linux](#linux-1)
- [macOS](#macos-1)
- [Windows](#windows-2)
- [Haskell - Cabal](#haskell---cabal) - [Haskell - Cabal](#haskell---cabal)
- [Haskell - Stack](#haskell---stack)
- [Java - Gradle](#java---gradle) - [Java - Gradle](#java---gradle)
- [Java - Maven](#java---maven) - [Java - Maven](#java---maven)
- [Node - npm](#node---npm) - [Node - npm](#node---npm)
- [macOS and Ubuntu](#macos-and-ubuntu) - [macOS and Ubuntu](#macos-and-ubuntu)
- [Windows](#windows-2) - [Windows](#windows-3)
- [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config) - [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config)
- [Node - Lerna](#node---lerna) - [Node - Lerna](#node---lerna)
- [Node - Yarn](#node---yarn) - [Node - Yarn](#node---yarn)
@ -28,8 +33,6 @@
- [Using pip to get cache location](#using-pip-to-get-cache-location) - [Using pip to get cache location](#using-pip-to-get-cache-location)
- [Python - pipenv](#python---pipenv) - [Python - pipenv](#python---pipenv)
- [R - renv](#r---renv) - [R - renv](#r---renv)
- [Simple example](#simple-example-1)
- [Multiple OS's in a workflow](#multiple-oss-in-a-workflow-1)
- [Ruby - Bundler](#ruby---bundler) - [Ruby - Bundler](#ruby---bundler)
- [Rust - Cargo](#rust---cargo) - [Rust - Cargo](#rust---cargo)
- [Scala - SBT](#scala---sbt) - [Scala - SBT](#scala---sbt)
@ -66,6 +69,7 @@ With `actions/cache@v2` you can now exclude unwanted packages with [exclude patt
Or you could move the cache folder like below. Or you could move the cache folder like below.
>Note: This workflow does not work for projects that require files to be placed in user profile package folder >Note: This workflow does not work for projects that require files to be placed in user profile package folder
```yaml ```yaml
env: env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
@ -102,6 +106,42 @@ steps:
${{ runner.os }}-dub- ${{ runner.os }}-dub-
``` ```
## Deno
### Linux
```yaml
- uses: actions/cache@v2
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
```
### macOS
```yaml
- uses: actions/cache@v2
with:
path: |
~/.deno
~/Library/Caches/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
```
### Windows
```yaml
- uses: actions/cache@v2
with:
path: |
~\.deno
%LocalAppData%\deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deps.ts') }}
```
## Elixir - Mix ## Elixir - Mix
```yaml ```yaml
@ -149,8 +189,8 @@ steps:
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:
path: | path: |
%LocalAppData%\go-build ~\AppData\Local\go-build
~/go/pkg/mod ~\go\pkg\mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: |
${{ runner.os }}-go- ${{ runner.os }}-go-
@ -172,6 +212,25 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- restore-keys: ${{ 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 ## 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. >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.
@ -255,9 +314,7 @@ If using `npm config` to retrieve the cache directory, ensure you run [actions/s
- name: restore lerna - name: restore lerna
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: | path: **/node_modules
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
``` ```

4415
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache",
"version": "2.1.7", "version": "3.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",
@ -23,28 +23,28 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.8", "@actions/cache": "^1.0.10",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.0" "@actions/io": "^1.1.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.4.0", "@types/jest": "^27.4.1",
"@types/nock": "^11.1.0", "@types/nock": "^11.1.0",
"@types/node": "^12.20.42", "@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.10.1", "@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.10.1", "@typescript-eslint/parser": "^5.15.0",
"@zeit/ncc": "^0.20.5", "@zeit/ncc": "^0.20.5",
"eslint": "^8.8.0", "eslint": "^8.11.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.0.0", "eslint-plugin-jest": "^26.1.2",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^27.4.7", "jest": "^27.5.1",
"jest-circus": "^27.4.6", "jest-circus": "^27.5.1",
"nock": "^11.7.0", "nock": "^11.7.0",
"prettier": "^2.5.1", "prettier": "^2.6.0",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"typescript": "^3.9.9" "typescript": "^3.9.9"
} }