tree-sitter/.github/actions/cache/action.yml
dundargoc d54aa11cc3 ci: relax caching requirements
Specifically, ignore changes in workflow files. While it is technically
more correct to include them (as they may affect the caching), it is
unlikely.
2024-02-20 14:37:29 +01:00

24 lines
726 B
YAML

name: 'Cache'
description: "This action caches fixtures"
outputs:
cache-hit:
description: 'Cache hit'
value: ${{ steps.cache_output.outputs.cache-hit }}
runs:
using: "composite"
steps:
- uses: actions/cache@v4
id: cache_fixtures
with:
path: |
test/fixtures/grammars
target/release/tree-sitter-*.wasm
key: fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles(
'cli/src/generate/**',
'script/generate-fixtures*',
'test/fixtures/grammars/*/**/src/*.c',
'.github/actions/cache/action.yml') }}
- run: echo "cache-hit=${{ steps.cache_fixtures.outputs.cache-hit }}" >> $GITHUB_OUTPUT
shell: bash
id: cache_output