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: diff --git a/README.md b/README.md index 11b7970..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. +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 diff --git a/examples.md b/examples.md index 52a68e5..a580dbb 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) - [Rust - Cargo](#rust---cargo) ## Node - npm @@ -98,6 +99,17 @@ uses: actions/cache@preview ${{ runner.os }}-gem- ``` +## Go - Modules + +```yaml +- uses: actions/cache@preview + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- +``` + ## Rust - Cargo ``` @@ -116,4 +128,4 @@ uses: actions/cache@preview with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} -``` +``` \ No newline at end of file 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); } 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)); }