From 0e865544100fd9b596bf5353e78e2e05cf0027fd Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 1 Nov 2019 10:22:36 -0400 Subject: [PATCH 1/6] Ignore all .md files --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b2f9516..59bb21f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -5,7 +5,7 @@ on: branches: - master paths-ignore: - - '**/*.md' + - '**.md' jobs: test: From 2523667574a825e8f8071d2da7aca1eac9a4d5d5 Mon Sep 17 00:00:00 2001 From: David Hadka Date: Fri, 1 Nov 2019 10:35:10 -0400 Subject: [PATCH 2/6] Add note about time-based eviction to README (#30) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 11b7970..495156d 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ See [Examples](examples.md) ## Cache Limits -Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. +Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last two weeks will also be evicted. ## Skipping steps based on cache-hit From 7058277028da493102465eeee25e9a7ee8446bce Mon Sep 17 00:00:00 2001 From: Winter Jung Date: Fri, 1 Nov 2019 23:35:38 +0900 Subject: [PATCH 3/6] Fix typo in error message (#29) --- src/utils/actionUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/actionUtils.ts b/src/utils/actionUtils.ts index 81c0068..d4d7638 100644 --- a/src/utils/actionUtils.ts +++ b/src/utils/actionUtils.ts @@ -72,7 +72,7 @@ export function resolvePath(filePath: string): string { if (filePath[0] === "~") { const home = os.homedir(); if (!home) { - throw new Error("Unable to resole `~` to HOME"); + throw new Error("Unable to resolve `~` to HOME"); } return path.join(home, filePath.slice(1)); } From d3849876226ba894c4d70c114f2fc67af4015a6f Mon Sep 17 00:00:00 2001 From: Zach Renner <13670625+zarenner@users.noreply.github.com> Date: Fri, 1 Nov 2019 11:20:27 -0700 Subject: [PATCH 4/6] Time based eviction interval is 1 week (#34) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 495156d..a289d65 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ See [Examples](examples.md) ## Cache Limits -Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last two weeks will also be evicted. +Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted. ## Skipping steps based on cache-hit From 25e0c8faac42f323280d4d39373a00d402bd5e11 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Fri, 1 Nov 2019 20:24:11 +0100 Subject: [PATCH 5/6] Remove cache checksum debug - close #24 (#26) * Remove cache checksum debug - close #24 * Remove cache checksum debug on save * Fix formatting --- src/restore.ts | 7 ------- src/save.ts | 7 ------- 2 files changed, 14 deletions(-) diff --git a/src/restore.ts b/src/restore.ts index f93ef51..66a45aa 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -94,13 +94,6 @@ async function run() { core.info( `Cache restored from key:${cacheEntry && cacheEntry.cacheKey}` ); - - try { - core.info("Cache Checksum:"); - await exec(`md5sum`, [`${archivePath}`]); - } catch (error) { - core.debug(`Failed to checkum with ${error}`); - } } catch (error) { core.warning(error.message); utils.setCacheHitOutput(false); diff --git a/src/save.ts b/src/save.ts index e03954f..f688e70 100644 --- a/src/save.ts +++ b/src/save.ts @@ -66,13 +66,6 @@ async function run() { const stream = fs.createReadStream(archivePath); await cacheHttpClient.saveCache(stream, primaryKey); - - try { - core.info("Cache Checksum:"); - await exec(`md5sum`, [`${archivePath}`]); - } catch (error) { - core.debug(`Failed to checkum with ${error}`); - } } catch (error) { core.warning(error.message); } From 87c0185d277471b4abb276a3891e4596e637cf63 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 1 Nov 2019 20:27:43 +0100 Subject: [PATCH 6/6] Add Go modules example (#18) * Add Go modules example * Fix TOC --- examples.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples.md b/examples.md index 72779ee..bd9bc51 100644 --- a/examples.md +++ b/examples.md @@ -8,6 +8,7 @@ - [Swift, Objective-C - Carthage](#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods) - [Ruby - Gem](#ruby---gem) +- [Go - Modules](#go---modules) ## Node - npm @@ -95,4 +96,15 @@ uses: actions/cache@preview key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gem- -``` \ No newline at end of file +``` + +## Go - Modules + +```yaml +- uses: actions/cache@preview + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- +```