Skip to content

Commit

Permalink
Enable --cache-from for buildkit build
Browse files Browse the repository at this point in the history
The magic key here is --build-arg=BUILDKIT_INLINE_CACHE=1
  • Loading branch information
glensc committed Mar 9, 2021
1 parent 4f7606e commit 8410a13
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ jobs:
env:
COMPOSE_DOCKER_CLI_BUILD: "1"
DOCKER_BUILDKIT: "1"
CACHE_TAG: "xhgui/xhgui:latest"

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Docker build
run: |
docker build --build-arg=BUILD_SOURCE=prebuilt .
run: >
docker build
--build-arg=BUILDKIT_INLINE_CACHE=1
--build-arg=BUILD_SOURCE=prebuilt
--cache-from=$CACHE_TAG
.
# vim:ft=yaml:et:ts=2:sw=2

0 comments on commit 8410a13

Please sign in to comment.