File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,13 +23,28 @@ jobs:
2323 echo "kurtosis_version=$kurtosis_version" >> $GITHUB_OUTPUT
2424
2525 echo "Kurtosis version: $kurtosis_version"
26+ - name : Check if cache key exists
27+ id : check_cache
28+ env :
29+ GH_TOKEN : ${{ github.token }}
30+ run : |
31+ KEY="kurtosis-docker-${{ runner.os }}-${{ steps.kurtosis_version.outputs.kurtosis_version }}"
32+ CACHE_HIT=$(gh cache list --repo ${{ github.repository }} --json "key" --key "$KEY" | jq -c ".[]" | wc -l)
33+ if [ $CACHE_HIT -gt 0 ]; then
34+ echo "exists=true" >> $GITHUB_OUTPUT
35+ else
36+ echo "exists=false" >> $GITHUB_OUTPUT
37+ fi
38+
2639 - name : Cache Docker images.
2740 id : cache
41+ if : ${{ steps.check_cache.outputs.exists == 'false' }}
2842 uses : ScribeMD/docker-cache@0.5.0
2943 with :
3044 key : kurtosis-docker-${{ runner.os }}-${{ steps.kurtosis_version.outputs.kurtosis_version }}
3145
3246 - name : " Generate dummy kurtosis config"
47+ if : ${{ steps.check_cache.outputs.exists == 'false' }}
3348 shell : bash
3449 run : |
3550 mkdir -p ./temp
You can’t perform that action at this time.
0 commit comments