Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 6165ea5

Browse files
committed
Improve the documentation regarding the new template function
1 parent eca6694 commit 6165ea5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

DOCS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Cache key template syntax is very basic. You just need to provide a string. In t
3333
Also following helper functions provided for your use:
3434

3535
* `checksum`: Provides md5 hash of a file for given path
36+
* `hashFiles`: Provides SHA256 hash after SHA256 hashing each single file
3637
* `epoch`: Provides Unix epoch
3738
* `arch`: Provides Architecture of running system
3839
* `os`: Provides Operation system of running system
@@ -44,6 +45,10 @@ For further information about this syntax please see [official docs](https://gol
4445
`"{{ .Repo.Name }}-{{ .Commit.Branch }}-{{ checksum "go.mod" }}-yadayadayada"`
4546

4647
`"{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}"`
48+
49+
`"{{ .Repo.Name }}_{{ hashFiles "go.mod" "go.sum" }}_{{ arch }}_{{ os }}"`
50+
51+
`"{{ .Repo.Name }}_{{ hashFiles "go.*" }}_{{ arch }}_{{ os }}"`
4752
*Metadata*
4853

4954
Following metadata object is available and pre-populated with current build information for you to use in cache key templates.

docs/cache_key_templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Cache key template syntax is very basic. You just need to provide a string. In t
55
Also following helper functions provided for your use:
66

77
* `checksum`: Provides md5 hash of a file for given path
8-
* `hashFiles`: Provides md5 hash after md5 hashing each single file
8+
* `hashFiles`: Provides SHA256 hash after SHA256 hashing each single file
99
* `epoch`: Provides Unix epoch
1010
* `arch`: Provides Architecture of running system
1111
* `os`: Provides Operation system of running system

0 commit comments

Comments
 (0)