bitrise-steplib / bitrise-step-save-cache

1 stars 4 forks source link

Skip saving the cache if possible #22

Closed ofalvai closed 1 year ago

ofalvai commented 1 year ago

Checklist

Version

Requires a MAJOR/MINOR/PATCH version update

Context

See https://github.com/bitrise-io/go-steputils/pull/67

Changes

New feature in action (see the E2E test logs for more details):

+------------------------------------------------------------------------------+
| (5) Execute step after restore                                               |
+------------------------------------------------------------------------------+
| id: ./                                                                       |
| version:                                                                     |
| collection: path                                                             |
| toolkit: go                                                                  |
| time: 2022-10-13T10:52:31Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Input:
- verbose: true
- key: node-modules-{{ checksum "package-lock.json" }}
- paths: node_modules
- is_key_unique: true
Evaluating key template: node-modules-{{ checksum "package-lock.json" }}
Files included in checksum:
- package-lock.json
Cache key: node-modules-9175abe5aea83e3c16254f8eb7446bb62b062dbf6bf77c79839f33db991de359
Cache save can be skipped, reason: a cache with the same key was restored in the workflow, new cache would have the same content
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | Execute step after restore                                    | 1.92 sec |
+---+---------------------------------------------------------------+----------+

Investigation details

Decisions