Skip to content

actions.cache: accept a list of file patterns to hash#19

Merged
regadas merged 1 commit intoregadas:masterfrom
JackKelly-Bellroy:cache-hash-multiple-files
Aug 24, 2020
Merged

actions.cache: accept a list of file patterns to hash#19
regadas merged 1 commit intoregadas:masterfrom
JackKelly-Bellroy:cache-hash-multiple-files

Conversation

@JackKelly-Bellroy
Copy link
Copy Markdown
Contributor

Fixes #17

@JackKelly-Bellroy
Copy link
Copy Markdown
Contributor Author

If you are happy with the way I have set up action argument schemas in #20 , I might do the same here because I find myself wanting to pass an id parameter to the actions/cache action (so I can skip steps on cache hit).

Copy link
Copy Markdown
Owner

@regadas regadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @JackKelly-Bellroy (sorry for late review)

@regadas
Copy link
Copy Markdown
Owner

regadas commented Aug 24, 2020

regarding the id I guess you could do:

GithubActions.steps.actions/cache
          { path = "PATH", key = "KEY", hashFile = ["**/files"] } // { id = Some "ID" } 

It's inline with how we would set it for other actions.

@regadas regadas merged commit 80454c3 into regadas:master Aug 24, 2020
@JackKelly-Bellroy JackKelly-Bellroy deleted the cache-hash-multiple-files branch August 24, 2020 10:11
@JackKelly-Bellroy
Copy link
Copy Markdown
Contributor Author

Re: // { id = "foo" }: I think the record-of-three-args is juuust small enough that not using schemas still feels okay, given that we can splice the fields we need into the record afterwards (unless there's some big consistency push later to give everything a schema or somesuch). Thanks for the tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

steps.cache should accept multiple patterns

2 participants