@@ -251,38 +251,14 @@ runs:
251251
252252 # Caching setup
253253 - id : cache-arguments
254- uses : int128/docker-build-cache-config-action@ce0c27484fc5f89cfd9fc210a794d42b9ad9b82f # v1.41 .0
254+ uses : int128/docker-build-cache-config-action@113b5dc2a397fc088bfbddc8ffb44ea9f2565a99 # v1.42 .0
255255 with :
256256 image : ${{ steps.get-docker-config.outputs.cache-image }}
257257 flavor : ${{ steps.get-docker-config.outputs.cache-flavor }}
258258 pull-request-cache : true
259259 cache-type : ${{ inputs.cache-type }}
260260 extra-cache-to : " image-manifest=true,oci-mediatypes=true"
261261
262- # FIXME: Remove this when https://github.com/int128/docker-build-cache-config-action/pull/1213 is merged
263- - id : transform-cache-gha
264- if : inputs.cache-type == 'gha'
265- uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
266- with :
267- script : |
268- const cacheFrom = `${{ steps.cache-arguments.outputs.cache-from }}`;
269- const cacheTo = `${{ steps.cache-arguments.outputs.cache-to }}`;
270-
271- core.info(`Original cache-from: ${cacheFrom}`);
272- core.info(`Original cache-to: ${cacheTo}`);
273-
274- // Transform cache-from: replace ref= with scope=
275- const transformedCacheFrom = cacheFrom.replace(/ref=/g, 'scope=');
276-
277- // Transform cache-to: replace ref= with scope=
278- const transformedCacheTo = cacheTo.replace(/ref=/g, 'scope=');
279-
280- core.info(`Transformed cache-from: ${transformedCacheFrom}`);
281- core.info(`Transformed cache-to: ${transformedCacheTo}`);
282-
283- core.setOutput('cache-from', transformedCacheFrom);
284- core.setOutput('cache-to', transformedCacheTo);
285-
286262 - uses : actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
287263 id : cache
288264 with :
@@ -314,12 +290,8 @@ runs:
314290 secrets : ${{ inputs.secrets }}
315291 secret-envs : ${{ inputs.secret-envs }}
316292 platforms : ${{ inputs.platform }}
317- # FIXME: Remove 'inputs.cache-type == 'gha' && steps.transform-cache-gha.outputs.cache-from ||'
318- # when https://github.com/int128/docker-build-cache-config-action/pull/1213 is merged
319- cache-from : ${{ inputs.cache-type == 'gha' && steps.transform-cache-gha.outputs.cache-from || steps.cache-arguments.outputs.cache-from }}
320- # FIXME: Remove 'inputs.cache-type == 'gha' && steps.transform-cache-gha.outputs.cache-to ||'
321- # when https://github.com/int128/docker-build-cache-config-action/pull/1213 is merged
322- cache-to : ${{ inputs.cache-type == 'gha' && steps.transform-cache-gha.outputs.cache-to || steps.cache-arguments.outputs.cache-to }}
293+ cache-from : ${{ steps.cache-arguments.outputs.cache-from }}
294+ cache-to : ${{ steps.cache-arguments.outputs.cache-to }}
323295 outputs : |
324296 ${{ steps.get-docker-config.outputs.multi-platform && 'type=image,push-by-digest=true,name-canonical=true,push=true' || 'type=image,push=true' }}
325297 labels : ${{ steps.metadata.outputs.labels }}
0 commit comments