question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calculate key based on multiple locations

See original GitHub issue

It would be great to have the ability to calculate cache key based on multiple locations. Have a look at my example project: https://github.com/railsconfig/config

- uses: actions/cache@v1
  with:
    path: vendor/bundle
    key: ${{ runner.os }}-gem-${{ hashFiles('**/gemfiles/**') }}-${{ hashFiles('*.gemspec') }}

would be better expressed as:

- uses: actions/cache@v1
  with:
    path: vendor/bundle
    key: ${{ runner.os }}-gem-${{ hashFiles(['**/gemfiles/**', '*.gemspec']) }}

Unfortunately, there is no way to pass an array of files to the hashFiles function.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
joshmgrosscommented, May 27, 2020

👋 Hi all, this is supported by hashFiles but not documented.

To specify multiple patterns, you can pass a comma separated list:

hashFiles('.config/dotnet-tools.json', '**/packages.lock.json')

I will make sure this is documented.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dart/Flutter: How can i calculate values of multiple maps which ...
I want to combine these maps and sum the values that contains the same key and store it in an another map. For...
Read more >
How to Make a Distance Matrix & Calculate Times to Multiple ...
Learn how to create a distance matrix and calculate travel times to multiple destinations.
Read more >
How to calculate the key size of a redesign of Enigma
To compute bit length equivalent of your key, you need to compute log2(Ω) where Ω is the space of possible keys.
Read more >
Excel Multiple Criteria Lookup INDEX MATCH or FILTER
To calculate the price based on 2 criteria, enter this array-entered* INDEX and MATCH formula in cell E13. The formula is explained below....
Read more >
Calculating values for Primary Key – SQLServerCentral Forums
Hello All, I have two tables. The First table is staging table where I have data called MatCodeID, MatCode, MatDesc
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found