Skip to content

Commit d00cdea

Browse files
committed
CI: inline build job and use mode=min GHA cache
The reusable workflow from dockette/.github hardcodes cache-to:type=gha,mode=max which fails for large images like coder (docker/buildx#841). The GHA cache API returns HTML error pages when hitting size/rate limits, causing "buildx failed with: </body></html>". Inline the build steps so we can control cache settings. Use the default mode=min which only caches final layers, avoiding the issue. https://claude.ai/code/session_01WY1ytdnf8Hrx3p7fnmZCUr
1 parent 6596973 commit d00cdea

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

.github/workflows/docker.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,30 @@ jobs:
3838
build:
3939
name: "Build"
4040
needs: test
41-
uses: dockette/.github/.github/workflows/docker.yml@master
42-
secrets: inherit
43-
with:
44-
image: "dockette/coder"
45-
tag: "fx"
46-
context: "fx"
47-
platforms: "linux/amd64"
48-
push: ${{ github.ref == 'refs/heads/master' }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v6
45+
46+
- name: Login to DockerHub
47+
uses: docker/login-action@v4
48+
with:
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}
50+
password: ${{ secrets.DOCKERHUB_TOKEN }}
51+
52+
- name: Set up QEMU
53+
uses: docker/setup-qemu-action@v4
54+
55+
- name: Set up Docker Buildx
56+
uses: docker/setup-buildx-action@v4
57+
58+
- name: Build and push
59+
uses: docker/build-push-action@v7
60+
with:
61+
context: ./fx
62+
file: ./fx/Dockerfile
63+
push: ${{ github.ref == 'refs/heads/master' }}
64+
tags: dockette/coder:fx
65+
platforms: linux/amd64
66+
cache-from: type=gha
67+
cache-to: type=gha

0 commit comments

Comments
 (0)