Skip to content

Commit 12a728b

Browse files
authored
specify arch in cache key (#10)
This PR specifies the architecture in the cache key. This solves a bug where using `cache: true` on multiple cpu architectures of the same os can cause the cache to be poisoned
1 parent 8041f42 commit 12a728b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ runs:
2222
uses: actions/cache@v4
2323
with:
2424
path: ${{ runner.os == 'macOS' && '~/Library/Caches/hermit/pkg' || '~/.cache/hermit/pkg' }}
25-
key: ${{ runner.os }}-hermit-cache-${{ steps.bin-hash.outputs.hash }}
25+
key: ${{ runner.os }}-${{ runner.arch}}-hermit-cache-${{ steps.bin-hash.outputs.hash }}
2626
restore-keys: |
27-
${{ runner.os }}-hermit-cache-
27+
${{ runner.os }}-${{ runner.arch}}-hermit-cache-
2828
- shell: bash
2929
working-directory: ${{ inputs.working-directory }}
3030
run: ./bin/hermit env --raw >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)