Skip to content

Commit 7eeaea0

Browse files
committed
build: remove gha cache
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 5be1246 commit 7eeaea0

File tree

3 files changed

+5
-42
lines changed

3 files changed

+5
-42
lines changed

.github/workflows/.test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
contents: read
2222
id-token: write
2323
with:
24-
cache: true
2524
file: test/hello.Dockerfile
2625
output: image
2726
push: ${{ github.event_name != 'pull_request' }}
@@ -71,8 +70,6 @@ jobs:
7170
contents: read
7271
id-token: write
7372
with:
74-
cache: true
75-
cache-scope: build-aws
7673
file: test/hello.Dockerfile
7774
output: image
7875
platforms: linux/amd64,linux/arm64
@@ -122,8 +119,6 @@ jobs:
122119
contents: read
123120
id-token: write
124121
with:
125-
cache: true
126-
cache-scope: build-aws
127122
file: test/hello.Dockerfile
128123
output: image
129124
platforms: linux/amd64,linux/arm64

.github/workflows/build.yml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,6 @@ on:
3535
type: string
3636
description: "List of build-time variables. If you want to set a build-arg through an environment variable, use the envs input"
3737
required: false
38-
cache:
39-
type: boolean
40-
description: "Enable cache to GitHub Actions cache backend"
41-
required: false
42-
default: false
43-
cache-scope:
44-
type: string
45-
description: "Which scope cache object belongs to if cache enabled (defaults to target name if set)"
46-
required: false
47-
cache-mode:
48-
type: string
49-
description: "Cache layers to export if cache enabled (min or max)"
50-
required: false
51-
default: 'min'
5238
context:
5339
type: string
5440
description: "Context to build from in the Git working tree"
@@ -319,13 +305,16 @@ jobs:
319305
name: Set up QEMU
320306
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
321307
if: ${{ inputs.setup-qemu }}
308+
with:
309+
cache-image: false
322310
-
323311
name: Set up Docker Buildx
324312
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
325313
with:
326314
version: ${{ env.BUILDX_VERSION }}
327315
buildkitd-flags: --debug
328316
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
317+
cache-binary: false
329318
-
330319
name: Prepare
331320
id: prepare
@@ -334,9 +323,6 @@ jobs:
334323
INPUT_PLATFORM: ${{ matrix.platform }}
335324
INPUT_LOCAL-EXPORT-DIR: ${{ env.LOCAL_EXPORT_DIR }}
336325
INPUT_ANNOTATIONS: ${{ inputs.annotations }}
337-
INPUT_CACHE: ${{ inputs.cache }}
338-
INPUT_CACHE-SCOPE: ${{ inputs.cache-scope }}
339-
INPUT_CACHE-MODE: ${{ inputs.cache-mode }}
340326
INPUT_LABELS: ${{ inputs.labels }}
341327
INPUT_CONTEXT: ${{ inputs.context }}
342328
INPUT_OUTPUT: ${{ inputs.output }}
@@ -357,9 +343,6 @@ jobs:
357343
const inpLocalExportDir = core.getInput('local-export-dir');
358344
359345
const inpAnnotations = core.getMultilineInput('annotations');
360-
const inpCache = core.getBooleanInput('cache');
361-
const inpCacheScope = core.getInput('cache-scope');
362-
const inpCacheMode = core.getInput('cache-mode');
363346
const inpContext = core.getInput('context');
364347
const inpLabels = core.getMultilineInput('labels');
365348
const inpOutput = core.getInput('output');
@@ -395,11 +378,6 @@ jobs:
395378
core.setOutput('platform', inpPlatform);
396379
}
397380
398-
if (inpCache) {
399-
core.setOutput('cache-from', `type=gha,scope=${inpCacheScope || inpTarget || 'buildkit'}${platformPairSuffix}`);
400-
core.setOutput('cache-to', `type=gha,scope=${inpCacheScope || inpTarget || 'buildkit'}${platformPairSuffix},mode=${inpCacheMode}`);
401-
}
402-
403381
if (inpSetMetaAnnotations && inpMetaAnnotations.length > 0) {
404382
inpAnnotations.push(...inpMetaAnnotations);
405383
}
@@ -431,8 +409,6 @@ jobs:
431409
with:
432410
annotations: ${{ steps.prepare.outputs.annotations }}
433411
build-args: ${{ inputs.build-args }}
434-
cache-from: ${{ steps.prepare.outputs.cache-from }}
435-
cache-to: ${{ steps.prepare.outputs.cache-to }}
436412
context: ${{ steps.prepare.outputs.context }}
437413
file: ${{ inputs.file }}
438414
labels: ${{ steps.prepare.outputs.labels }}
@@ -459,7 +435,7 @@ jobs:
459435
const { Install } = require('@docker/actions-toolkit/lib/cosign/install');
460436
461437
const cosignInstall = new Install();
462-
const cosignBinPath = await cosignInstall.download(core.getInput('cosign-version'), false, true);
438+
const cosignBinPath = await cosignInstall.download(core.getInput('cosign-version'), true, true);
463439
await cosignInstall.install(cosignBinPath);
464440
465441
const cosign = new Cosign();
@@ -624,6 +600,7 @@ jobs:
624600
version: ${{ env.BUILDX_VERSION }}
625601
buildkitd-flags: --debug
626602
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
603+
cache-binary: false
627604
-
628605
name: Create manifest
629606
if: ${{ inputs.output == 'image' }}

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ toward higher levels of security and trust.
7777
requiring emulation or [custom CI logic](https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners)
7878
or self-managed runners.
7979
80-
* **Optimized cache warming & reuse.**
81-
The builder can use the GitHub Actions cache backend to persist layers across
82-
branches, PRs, and rebuilds. This significantly reduces cold-start times and
83-
avoids repeating expensive dependency installations, even for external
84-
contributors' pull requests.
85-
8680
* **Centralized build configuration.**
8781
Repositories no longer need to configure buildx drivers, tune storage, or
8882
adjust resource limits. The reusable workflows encapsulate the recommended
@@ -231,9 +225,6 @@ on:
231225
| `envs` | List | | Environment variables to inject in the reusable workflow as list of key-value pair. This is similar to the [GitHub Actions `env` context](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#env-context) that is currently not available when calling a reusable workflow |
232226
| `annotations` | List | | List of annotations to set to the image (for `image` output) |
233227
| `build-args` | List | `auto` | List of [build-time variables](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-arg). If you want to set a build-arg through an environment variable, use the `envs` input |
234-
| `cache` | Bool | `false` | Enable [GitHub Actions cache](https://docs.docker.com/build/cache/backends/gha/) exporter |
235-
| `cache-scope` | String | target name or `buildkit` | Which [scope cache object belongs to](https://docs.docker.com/build/cache/backends/gha/#scope) if `cache` is enabled. This is the cache blob prefix name used when pushing cache to GitHub Actions cache backend |
236-
| `cache-mode` | String | `min` | [Cache layers to export](https://docs.docker.com/build/cache/backends/#cache-mode) if cache enabled (`min` or `max`). In `min` cache mode, only layers that are exported into the resulting image are cached, while in `max` cache mode, all layers are cached, even those of intermediate steps |
237228
| `context` | String | `.` | Context to build from in the Git working tree |
238229
| `file` | String | `{context}/Dockerfile` | Path to the Dockerfile |
239230
| `labels` | List | | List of labels for an image (for `image` output) |

0 commit comments

Comments
 (0)