WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e9c5806

Browse files
committed
build: disable gha cache
Signed-off-by: CrazyMax <[email protected]>
1 parent 576bc2c commit e9c5806

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
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: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ on:
3939
type: string
4040
description: "List of build-time variables"
4141
required: false
42-
cache:
43-
type: boolean
44-
description: "Enable cache to GitHub Actions cache backend"
45-
required: false
46-
default: false
47-
cache-scope:
48-
type: string
49-
description: "Which scope cache object belongs to if cache enabled (defaults to target name if set)"
50-
required: false
51-
cache-mode:
52-
type: string
53-
description: "Cache layers to export if cache enabled (min or max)"
54-
required: false
55-
default: 'min'
5642
context:
5743
type: string
5844
description: "Context to build from (defaults to repository root)"
@@ -330,13 +316,15 @@ jobs:
330316
if: ${{ inputs.setup-qemu }}
331317
with:
332318
image: ${{ inputs.setup-qemu-image }}
319+
cache-image: false
333320
-
334321
name: Set up Docker Buildx
335322
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
336323
with:
337324
version: ${{ env.BUILDX_VERSION }}
338325
buildkitd-flags: --debug
339326
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
327+
cache-binary: false
340328
-
341329
name: Prepare
342330
id: prepare
@@ -345,9 +333,6 @@ jobs:
345333
INPUT_PLATFORM: ${{ matrix.platform }}
346334
INPUT_LOCAL-EXPORT-DIR: ${{ env.LOCAL_EXPORT_DIR }}
347335
INPUT_ANNOTATIONS: ${{ inputs.annotations }}
348-
INPUT_CACHE: ${{ inputs.cache }}
349-
INPUT_CACHE-SCOPE: ${{ inputs.cache-scope }}
350-
INPUT_CACHE-MODE: ${{ inputs.cache-mode }}
351336
INPUT_LABELS: ${{ inputs.labels }}
352337
INPUT_CONTEXT: ${{ inputs.context }}
353338
INPUT_OUTPUT: ${{ inputs.output }}
@@ -368,9 +353,6 @@ jobs:
368353
const inpLocalExportDir = core.getInput('local-export-dir');
369354
370355
const inpAnnotations = core.getMultilineInput('annotations');
371-
const inpCache = core.getBooleanInput('cache');
372-
const inpCacheScope = core.getInput('cache-scope');
373-
const inpCacheMode = core.getInput('cache-mode');
374356
const inpContext = core.getInput('context');
375357
const inpLabels = core.getMultilineInput('labels');
376358
const inpOutput = core.getInput('output');
@@ -406,11 +388,6 @@ jobs:
406388
core.setOutput('platform', inpPlatform);
407389
}
408390
409-
if (inpCache) {
410-
core.setOutput('cache-from', `type=gha,scope=${inpCacheScope || inpTarget || 'buildkit'}${platformPairSuffix}`);
411-
core.setOutput('cache-to', `type=gha,scope=${inpCacheScope || inpTarget || 'buildkit'}${platformPairSuffix},mode=${inpCacheMode}`);
412-
}
413-
414391
if (inpSetMetaAnnotations && inpMetaAnnotations.length > 0) {
415392
inpAnnotations.push(...inpMetaAnnotations);
416393
}
@@ -442,8 +419,6 @@ jobs:
442419
with:
443420
annotations: ${{ steps.prepare.outputs.annotations }}
444421
build-args: ${{ inputs.build-args }}
445-
cache-from: ${{ steps.prepare.outputs.cache-from }}
446-
cache-to: ${{ steps.prepare.outputs.cache-to }}
447422
context: ${{ steps.prepare.outputs.context }}
448423
file: ${{ inputs.file }}
449424
labels: ${{ steps.prepare.outputs.labels }}
@@ -636,6 +611,7 @@ jobs:
636611
version: ${{ env.BUILDX_VERSION }}
637612
buildkitd-flags: --debug
638613
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
614+
cache-binary: false
639615
-
640616
name: Create manifest
641617
if: ${{ inputs.output == 'image' }}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ on:
9696
| `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) but as it cannot be used when calling a reusable workflow, we need to define our own input |
9797
| `annotations` | List | | List of annotations to set to the image (for `image` output) |
9898
| `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 |
99-
| `cache` | Bool | `false` | Enable [GitHub Actions cache](https://docs.docker.com/build/cache/backends/gha/) exporter |
100-
| `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 |
101-
| `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 |
10299
| `context` | String | `.` | Context to build from in the Git working tree |
103100
| `file` | String | `{context}/Dockerfile` | Path to the Dockerfile (defaults to `{context}/Dockerfile`) |
104101
| `labels` | List | | List of labels for an image (for `image` output) |

0 commit comments

Comments
 (0)