robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

dependabot[bot]ci: bump actions/cacheb532180108

master
1.3 KiB37 linesraw
1name: 'Cache'
2description: "This action caches neovim dependencies"
3runs:
4  using: "composite"
5  steps:
6    - run: echo "CACHE_KEY=${GITHUB_WORKFLOW}" >> $GITHUB_ENV # zizmor: ignore[github-env]
7      shell: bash
8
9    - run: echo "CACHE_KEY=${GITHUB_JOB}" >> $GITHUB_ENV # zizmor: ignore[github-env]
10      shell: bash
11
12    - if: ${{ matrix }}
13      env:
14        MATRIX_JOIN: ${{ join(matrix.*, '-') }}
15      run: echo "CACHE_KEY=${CACHE_KEY}-${MATRIX_JOIN}" >> $GITHUB_ENV # zizmor: ignore[github-env]
16      shell: bash
17
18    - if: ${{ matrix.build }}
19      env:
20        MATRIX_JOIN: ${{ join(matrix.build.*, '-') }}
21      run: echo "CACHE_KEY=${CACHE_KEY}-${MATRIX_JOIN}" >> $GITHUB_ENV # zizmor: ignore[github-env]
22      shell: bash
23
24    - id: image
25      run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT
26      shell: bash
27
28    # Avoid using '**/CMakeLists.txt' (or any pattern starting with '**/') even
29    # if it makes the expression below simpler. hashFiles() has a timer that
30    # will fail the job if it times out, which can happen if there are too many
31    # files to search through.
32    - uses: actions/cache@v6.1.0
33      with:
34        path: .deps
35        key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
36          '.github/**', 'CMakeLists.txt',
37          'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}