Skip to content

Commit a2a7560

Browse files
dependabot[bot]neilime
authored andcommitted
chore(deps): bump int128/docker-build-cache-config-action
Bumps the github-actions-dependencies group with 1 update in the /actions/docker/build-image directory: [int128/docker-build-cache-config-action](https://github.com/int128/docker-build-cache-config-action). Updates `int128/docker-build-cache-config-action` from 1.41.0 to 1.42.0 - [Release notes](https://github.com/int128/docker-build-cache-config-action/releases) - [Commits](int128/docker-build-cache-config-action@ce0c274...113b5dc) --- updated-dependencies: - dependency-name: int128/docker-build-cache-config-action dependency-version: 1.42.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Emilien Escalle <[email protected]>
1 parent 393de4e commit a2a7560

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

actions/docker/build-image/action.yml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)