Compare commits
5 Commits
tiwarishub
...
3d236ac88e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d236ac88e | ||
|
|
b8ddf3df10 | ||
|
|
0c5d98e6bb | ||
|
|
7c59aeb02d | ||
|
|
c75dca6de7 |
2
.github/auto_assign.yml
vendored
2
.github/auto_assign.yml
vendored
@@ -6,7 +6,7 @@ addAssignees: false
|
|||||||
|
|
||||||
# A list of reviewers to be added to pull requests (GitHub user name)
|
# A list of reviewers to be added to pull requests (GitHub user name)
|
||||||
reviewers:
|
reviewers:
|
||||||
- kotewar
|
- phantsure
|
||||||
- aparna-ravindra
|
- aparna-ravindra
|
||||||
- tiwarishub
|
- tiwarishub
|
||||||
- vsvipul
|
- vsvipul
|
||||||
|
|||||||
2
.github/workflows/auto-assign-issues.yml
vendored
2
.github/workflows/auto-assign-issues.yml
vendored
@@ -11,5 +11,5 @@ jobs:
|
|||||||
- name: 'Auto-assign issue'
|
- name: 'Auto-assign issue'
|
||||||
uses: pozil/auto-assign-issue@v1.4.0
|
uses: pozil/auto-assign-issue@v1.4.0
|
||||||
with:
|
with:
|
||||||
assignees: kotewar,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
|
assignees: phantsure,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
|
||||||
numOfAssignee: 1
|
numOfAssignee: 1
|
||||||
|
|||||||
@@ -72,8 +72,6 @@ jobs:
|
|||||||
run: /primes.sh -d prime-numbers
|
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
|
## Implementation Examples
|
||||||
|
|
||||||
Every programming language and framework has its own way of caching.
|
Every programming language and framework has its own way of caching.
|
||||||
|
|||||||
@@ -15,6 +15,3 @@
|
|||||||
|
|
||||||
### 3.0.4
|
### 3.0.4
|
||||||
- Fixed tar creation error while trying to create tar with path as `~/` home folder on `ubuntu-latest`. ([issue](https://github.com/actions/cache/issues/689))
|
- Fixed tar creation error while trying to create tar with path as `~/` home folder on `ubuntu-latest`. ([issue](https://github.com/actions/cache/issues/689))
|
||||||
|
|
||||||
### 3.0.5
|
|
||||||
- Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. ([PR](https://github.com/actions/cache/pull/834))
|
|
||||||
5
dist/save/index.js
vendored
5
dist/save/index.js
vendored
@@ -46795,9 +46795,10 @@ function run() {
|
|||||||
const cacheId = yield cache.saveCache(cachePaths, primaryKey, {
|
const cacheId = yield cache.saveCache(cachePaths, primaryKey, {
|
||||||
uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize)
|
uploadChunkSize: utils.getInputAsInt(constants_1.Inputs.UploadChunkSize)
|
||||||
});
|
});
|
||||||
if (cacheId != -1) {
|
if (cacheId == -1) {
|
||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
return;
|
||||||
}
|
}
|
||||||
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(error.message);
|
||||||
|
|||||||
23
examples.md
23
examples.md
@@ -223,8 +223,6 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
|
|||||||
|
|
||||||
## Haskell - Stack
|
## Haskell - Stack
|
||||||
|
|
||||||
### Linux or macOS
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
name: Cache ~/.stack
|
name: Cache ~/.stack
|
||||||
@@ -242,27 +240,6 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
|
|||||||
${{ runner.os }}-stack-work-
|
${{ 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
|
## 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.
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "3.0.5",
|
"version": "3.0.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "3.0.5",
|
"version": "3.0.4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.0.0",
|
"@actions/cache": "^3.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "3.0.5",
|
"version": "3.0.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -47,10 +47,11 @@ async function run(): Promise<void> {
|
|||||||
const cacheId = await cache.saveCache(cachePaths, primaryKey, {
|
const cacheId = await cache.saveCache(cachePaths, primaryKey, {
|
||||||
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
||||||
});
|
});
|
||||||
|
if (cacheId == -1) {
|
||||||
if (cacheId != -1) {
|
return;
|
||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
utils.logWarning((error as Error).message);
|
utils.logWarning((error as Error).message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user