feat: add configurable cache key with template variable support (#246)

I closed [this PR](https://github.com/jdx/mise-action/pull/235) by
mistake so I'm reopening it.
This commit is contained in:
Pedro Piñera Buendía 2025-08-19 17:59:36 +02:00 committed by GitHub
parent c0b8518a9f
commit d53c31b046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 8807 additions and 173 deletions

View file

@ -105,6 +105,23 @@ jobs:
exit 1
if: ${{ steps.bad.outcome != 'failure' }}
custom_cache_key:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup mise with custom cache key
uses: ./
with:
cache_key: "custom-{{platform}}-{{install_args_hash}}-${{ github.run_id }}"
install_args: "jq@1.7.1"
mise_toml: |
[tools]
jq = "1.7.1"
- run: mise --version
- run: mise x jq -- jq --version
- run: which jq
- run: jq --version
fetch_from_github:
runs-on: ubuntu-latest
steps: