@@ -22,10 +22,6 @@ inputs:
2222 description : " path for various caches"
2323 required : true
2424 default : " .cache"
25- GITHUB_TOKEN :
26- description : " GitHub token for authentication"
27- required : true
28- default : " ${{ github.token }}"
2925 CCACHE_HASH_FILE_KEY :
3026 description : " Unique cache key for ccache hash file"
3127 required : true
@@ -53,12 +49,13 @@ runs:
5349
5450 echo "export CCACHE_LOGFILE=$GITHUB_WORKSPACE/$ccache_log_file" >> "${{ inputs.CONFIGURATION_PATH_CCACHE }}"
5551
56- - name : Restore ccache Hash File
52+ - name : ccache restore hash file
5753 uses : actions/cache/restore@v4
5854 with :
5955 path : ${{ inputs.CACHE_PATH }}/ccache_last_hash
6056 key : ${{ inputs.CCACHE_HASH_FILE_KEY }}
61-
57+ restore-keys : |
58+ ${{ inputs.CCACHE_HASH_FILE_KEY }}-
6259
6360 - name : ccache update hash file
6461 env :
@@ -97,20 +94,12 @@ runs:
9794 echo "ccache_cache_key=ccache-${{ runner.os }}-$new_hash" >> $GITHUB_ENV
9895 echo "ccache_cache_restore_key=ccache-${{ runner.os }}-$prev_hash" >> $GITHUB_ENV
9996
100- - name : ccache remove hash file
101- if : env.ccache_hash_file_changed == 'true'
102- uses : open-control-systems/gh-action-cache-clear@v0.0.2
103- with :
104- PATTERN : " ^${{ inputs.CCACHE_HASH_FILE_KEY }}"
105- GITHUB_TOKEN : ${{ inputs.GITHUB_TOKEN }}
106-
107-
10897 - name : ccache save hash file
10998 if : env.ccache_hash_file_changed == 'true'
11099 uses : actions/cache/save@v4
111100 with :
112101 path : ${{ inputs.CACHE_PATH }}/ccache_last_hash
113- key : ${{ inputs.CCACHE_HASH_FILE_KEY }}
102+ key : ${{ inputs.CCACHE_HASH_FILE_KEY }}-${{ github.run_id }}
114103
115104 - name : ccache setup cache
116105 uses : actions/cache@v4
0 commit comments