Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use gha cache exporter when building via buildkit #4095

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jose-fully-ported
Copy link
Contributor

What does this PR do?

Buildkit builds expose custom cache exporters which can be used to locally speed up builds on Github Actions. The gha cacher will use the Github Actions cache api instead of the remote registry for caching.

To enable this, set the following two environment variables.

DOCKER_BUILDKIT=1
BUILDKIT_CACHE_EXPORTER=gha

Note that the cache mode is set to min by default (no value == min) due to a potential timeout issue within the exporter. See moby/buildkit#2276 for details. To switch the cache mode, set the following environment variable:

BUILDKIT_CACHE_MODE=max

@jose-fully-ported jose-fully-ported force-pushed the jose-fully-ported/docker-gha-cache branch from 289fd41 to 3cac8d1 Compare December 14, 2023 16:46
Buildkit builds expose custom cache exporters which can be used to locally speed up builds on Github Actions. The gha cacher will use the Github Actions cache api instead of the remote registry for caching.

To enable this, set the following two environment variables.

```
DOCKER_BUILDKIT=1
BUILDKIT_CACHE_EXPORTER=gha
```

Note that the cache mode is set to min by default (no value == min) due to a potential timeout issue within the exporter. See moby/buildkit#2276 for details. To switch the cache mode, set the following environment variable:

```
BUILDKIT_CACHE_MODE=max
```
@jose-fully-ported jose-fully-ported force-pushed the jose-fully-ported/docker-gha-cache branch from 3cac8d1 to fb11958 Compare December 14, 2023 17:11
@jose-fully-ported jose-fully-ported requested review from ferozemohideen and removed request for ferozemohideen December 15, 2023 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant