Skip to content

Commit

Permalink
Improve the documentation regarding the new template function
Browse files Browse the repository at this point in the history
  • Loading branch information
ste93cry committed Jul 19, 2022
1 parent eca6694 commit 6165ea5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Cache key template syntax is very basic. You just need to provide a string. In t
Also following helper functions provided for your use:

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

`"{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}"`

`"{{ .Repo.Name }}_{{ hashFiles "go.mod" "go.sum" }}_{{ arch }}_{{ os }}"`

`"{{ .Repo.Name }}_{{ hashFiles "go.*" }}_{{ arch }}_{{ os }}"`
*Metadata*

Following metadata object is available and pre-populated with current build information for you to use in cache key templates.
Expand Down
2 changes: 1 addition & 1 deletion docs/cache_key_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Cache key template syntax is very basic. You just need to provide a string. In t
Also following helper functions provided for your use:

* `checksum`: Provides md5 hash of a file for given path
* `hashFiles`: Provides md5 hash after md5 hashing each single file
* `hashFiles`: Provides SHA256 hash after SHA256 hashing each single file
* `epoch`: Provides Unix epoch
* `arch`: Provides Architecture of running system
* `os`: Provides Operation system of running system
Expand Down

0 comments on commit 6165ea5

Please sign in to comment.