From 90c1ee14efda96ee0d2a36e705af07645e8a28e4 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 1 Mar 2023 16:46:15 +0100 Subject: [PATCH] Fixt README wordings --- README.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 593337cd6..2b1139a94 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,11 @@ This action sets up a go environment for use in actions by: The V4 edition of the action offers: - - Enables caching by default - - Does not fail if caching fails for any reason + - Enabled caching by default -The action will try to enable caching unless the `cache` input explicitly set to false. +The action will try to enable caching unless the `cache` input is explicitly set to false. + +Please see "[Caching dependency files and build outputs](https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs)" for more information. # V3 @@ -146,25 +147,14 @@ steps: ## Caching dependency files and build outputs: The action has a built-in functionality for caching and restoring go modules and build outputs. It -uses [actions/cache](https://github.com/actions/cache) under the hood but requires less configuration settings. +uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under the hood but requires less configuration settings. The `cache` input is optional, and caching is turned on by default. The action defaults to search for the dependency file - go.sum in the repository root, and uses its hash as a part of the cache key. Use `cache-dependency-path` input for cases when multiple dependency files are used, or they are located in different subdirectories. -**Caching without specifying dependency file path** - -```yaml -steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: '1.17' - check-latest: true - cache: true - - run: go run hello.go -``` +If some problem that prevents success caching happens then the action issues the warning in the log and continues the execution of the pipeline. **Caching in monorepos** @@ -175,7 +165,6 @@ steps: with: go-version: '1.17' check-latest: true - cache: true cache-dependency-path: subdir/go.sum - run: go run hello.go ```