Skip to content

Commit

Permalink
Wrap cache_key in single-quotes in docs
Browse files Browse the repository at this point in the history
Without forcing the value to be interpreted as a string, the `{` bracket starts a new object block, and gives the following failure from drone:

```
yaml: invalid map key: map[interface {}]interface {}{"checksum \"yarn.lock\"":interface {}(nil)}
```
  • Loading branch information
remen committed Jun 10, 2022
1 parent d61e799 commit 5ae5bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ steps:
pull: true
settings:
restore: true
cache_key: {{ .Commit.Branch }}-{{ checksum "go.mod" }} # default if ommitted is {{ .Commit.Branch }}
cache_key: '{{ .Commit.Branch }}-{{ checksum "go.mod" }}' # default if ommitted is {{ .Commit.Branch }}
bucket: drone-cache-bucket
region: eu-west-1
mount:
Expand All @@ -93,7 +93,7 @@ steps:
from_secret: aws_secret_access_key
settings:
rebuild: true
cache_key: {{ .Commit.Branch }}-{{ checksum "go.mod" }} # default if ommitted is {{ .Commit.Branch }}
cache_key: '{{ .Commit.Branch }}-{{ checksum "go.mod" }}' # default if ommitted is {{ .Commit.Branch }}
bucket: drone-cache-bucket
region: eu-west-1
mount:
Expand Down

0 comments on commit 5ae5bcd

Please sign in to comment.