Skip to content

Commit

Permalink
fix(readme): bump cache-nix-action from @v5 to @v6
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Feb 18, 2025
1 parent ea34edf commit cfb2770
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ See [Caching Approaches](#caching-approaches).
- uses: nixbuild/nix-quick-install-action@v27

- name: Restore and cache Nix store
uses: nix-community/cache-nix-action@v5
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
Expand Down Expand Up @@ -471,7 +471,7 @@ jobs:
- name: Cache Primes
id: cache-primes
uses: nix-community/cache-nix-action@v5
uses: nix-community/cache-nix-action@v6
with:
primary-key: ${{ runner.os }}-primes
paths: prime-numbers
Expand Down Expand Up @@ -502,7 +502,7 @@ jobs:
- name: Restore cached Primes
id: cache-primes-restore
uses: nix-community/cache-nix-action/restore@v5
uses: nix-community/cache-nix-action/restore@v6
with:
primary-key: ${{ runner.os }}-primes
paths: |
Expand All @@ -513,7 +513,7 @@ jobs:
- name: Save Primes
id: cache-primes-save
uses: nix-community/cache-nix-action/save@v5
uses: nix-community/cache-nix-action/save@v6
with:
primary-key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }}
paths: |
Expand Down Expand Up @@ -568,7 +568,7 @@ A cache key can include any of the contexts, functions, literals, and operators
For example, using the [`hashFiles`](https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles) function allows you to create a new cache when dependencies change.

```yaml
- uses: nix-community/cache-nix-action@v5
- uses: nix-community/cache-nix-action@v6
with:
primary-key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
paths: |
Expand All @@ -585,7 +585,7 @@ Additionally, you can use arbitrary command output in a cache key, such as a dat
run: echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
- uses: nix-community/cache-nix-action@v5
- uses: nix-community/cache-nix-action@v6
with:
primary-key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/lockfiles') }}
paths: path/to/dependencies
Expand All @@ -611,7 +611,7 @@ Example:
steps:
- uses: actions/checkout@v4
- uses: nix-community/cache-nix-action@v5
- uses: nix-community/cache-nix-action@v6
id: cache
with:
path: path/to/dependencies
Expand Down Expand Up @@ -644,7 +644,7 @@ jobs:
- name: Cache Primes
id: cache-primes
uses: nix-community/cache-nix-action@v5
uses: nix-community/cache-nix-action@v6
with:
primary-key: primes
paths: prime-numbers
Expand All @@ -655,7 +655,7 @@ jobs:
- name: Cache Numbers
id: cache-numbers
uses: nix-community/cache-nix-action@v5
uses: nix-community/cache-nix-action@v6
with:
primary-key: primes
paths: numbers
Expand All @@ -671,7 +671,7 @@ jobs:
- name: Cache Primes
id: cache-primes
uses: nix-community/cache-nix-action@v5
uses: nix-community/cache-nix-action@v6
with:
primary-key: primes
paths: prime-numbers
Expand Down
4 changes: 2 additions & 2 deletions save/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Restore cached Prime Numbers
id: cache-prime-numbers-restore
uses: nix-community/cache-nix-action/restore@v5
uses: nix-community/cache-nix-action/restore@v6
with:
primary-key: ${{ runner.os }}-prime-numbers
paths: |
Expand All @@ -127,7 +127,7 @@ jobs:
- name: Always Save Prime Numbers
id: cache-prime-numbers-save
if: always() && steps.cache-prime-numbers-restore.outputs.hit-primary-key != 'true'
uses: nix-community/cache-nix-action/save@v5
uses: nix-community/cache-nix-action/save@v6
with:
primary-key: ${{ steps.cache-prime-numbers-restore.outputs.primary-key }}
paths: |
Expand Down

0 comments on commit cfb2770

Please sign in to comment.