Compare commits

...

4 Commits

Author SHA1 Message Date
Matthias Benkort
2acbcef99d
Merge d722552897 into 5656298164 2026-02-26 11:33:11 +00:00
Ryan Ghadimi
5656298164
Merge pull request #1722 from RyPeck/patch-1
Fix cache key in examples.md for bun.lock
2026-02-24 14:21:04 +00:00
Ryan Peck
4e380d19e1
Fix cache key in examples.md for bun.lock
Updated cache key to use 'bun.lock' instead of 'bun.lockb' for consistency.
2026-02-24 09:11:36 -05:00
Matthias Benkort
d722552897
Document path behaviour and access restrictions
Thanks to this comment which saved me some headache: https://github.com/actions/cache/issues/1491#issuecomment-2450718907

related to #1561.
related to #1491.
related to #1426.
2025-03-07 11:04:57 +01:00
2 changed files with 6 additions and 2 deletions

View File

@ -165,6 +165,10 @@ steps:
run: /publish.sh run: /publish.sh
``` ```
> [!IMPORTANT]
>
> The `path` must match on both the centralized job and the target job, otherwise there will be no cache-hit whatsoever. Also take notes of the [restrictions for accessing caches across workflows](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache).
### Failing/Exiting the workflow if cache with exact key is not found ### Failing/Exiting the workflow if cache with exact key is not found
You can use the output of this action to exit the workflow on cache miss. This way you can restrict your workflow to only initiate the build when `cache-hit` occurs, in other words, cache with exact key is found. You can use the output of this action to exit the workflow on cache miss. This way you can restrict your workflow to only initiate the build when `cache-hit` occurs, in other words, cache with exact key is found.

View File

@ -49,7 +49,7 @@
with: with:
path: | path: |
~/.bun/install/cache ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
``` ```
### Windows ### Windows
@ -59,7 +59,7 @@
with: with:
path: | path: |
~\.bun ~\.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
``` ```
## C# - NuGet ## C# - NuGet