Skip to content

Commit 62b059f

Browse files
committed
gh action docker build optimizations
1 parent 2d51062 commit 62b059f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
check-latest: true
3636

3737
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
38+
uses: docker/setup-buildx-action@v3
3939

4040
- name: Login to Docker Hub
4141
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
@@ -51,6 +51,7 @@ jobs:
5151
args: release
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
BUILDKIT_INLINE_CACHE: 1
5455

5556
helm:
5657
needs: release

.github/workflows/test-integration.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,25 @@ jobs:
3434
- name: Build worker-controller image
3535
run: |
3636
skaffold build --profile worker-controller --push=false
37+
env:
38+
DOCKER_BUILDKIT: 1
39+
BUILDKIT_PROGRESS: plain
3740

3841
- name: Build helloworld worker image
3942
run: |
4043
skaffold build --profile helloworld-worker --push=false
44+
env:
45+
DOCKER_BUILDKIT: 1
46+
BUILDKIT_PROGRESS: plain
4147

4248
# Verify that the demo worker patch applies successfully and builds.
4349
- name: Build helloworld worker image patch
4450
run: |
4551
git apply internal/demo/helloworld/changes/no-version-gate.patch
4652
skaffold build --profile helloworld-worker --push=false
53+
env:
54+
DOCKER_BUILDKIT: 1
55+
BUILDKIT_PROGRESS: plain
4756

4857
test-integration:
4958
name: Run Integration Tests

.goreleaser.main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ dockers:
4242
use: buildx
4343
build_flag_templates:
4444
- --platform=linux/amd64
45+
- --cache-from=type=gha,scope=amd64
46+
- --cache-to=type=gha,mode=max,scope=amd64
4547
- --label=org.opencontainers.image.title={{ .ProjectName }}
4648
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
4749
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller
@@ -63,6 +65,8 @@ dockers:
6365
use: buildx
6466
build_flag_templates:
6567
- --platform=linux/arm64
68+
- --cache-from=type=gha,scope=arm64
69+
- --cache-to=type=gha,mode=max,scope=arm64
6670
- --label=org.opencontainers.image.title={{ .ProjectName }}
6771
- --label=org.opencontainers.image.description=Temporal Worker Controller for Kubernetes
6872
- --label=org.opencontainers.image.url=https://github.com/temporalio/temporal-worker-controller

0 commit comments

Comments
 (0)