From 65af05ed286744ebd821b8bf3e0d82fc553a9204 Mon Sep 17 00:00:00 2001 From: Tim Pietrusky Date: Tue, 17 Mar 2026 12:01:08 +0100 Subject: [PATCH] fix: split Docker builds into separate jobs to avoid disk space exhaustion Each bake target now runs in its own runner via matrix strategy, preventing the "No space left on device" error that occurred when building all 8 images on a single runner. --- .changeset/split-docker-builds.md | 5 ++++ .github/workflows/release.yml | 42 +++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 .changeset/split-docker-builds.md diff --git a/.changeset/split-docker-builds.md b/.changeset/split-docker-builds.md new file mode 100644 index 00000000..3d2438b2 --- /dev/null +++ b/.changeset/split-docker-builds.md @@ -0,0 +1,5 @@ +--- +"worker-comfyui": patch +--- + +fix: split Docker builds into separate jobs to avoid running out of disk space diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e62306a2..0352c36f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,7 @@ jobs: outputs: hasChangesets: ${{ steps.changesets.outputs.hasChangesets }} + version: ${{ steps.version.outputs.version }} steps: - name: Checkout @@ -42,6 +43,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Read version from package.json + id: version + if: >- + github.event_name == 'workflow_dispatch' || + (steps.changesets.outputs.hasChangesets == 'false' && contains(github.event.head_commit.message, 'chore: version packages')) + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + docker: needs: release if: >- @@ -51,6 +59,19 @@ jobs: permissions: contents: write + strategy: + fail-fast: false + matrix: + target: + - base + - sdxl + - sd3 + - flux1-schnell + - flux1-dev + - flux1-dev-fp8 + - z-image-turbo + - base-cuda12-8-1 + steps: - name: Checkout uses: actions/checkout@v4 @@ -62,10 +83,6 @@ jobs: rm -rf "/usr/local/share/boost" rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Read version from package.json - id: version - run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -78,16 +95,27 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push the images to Docker Hub + - name: Build and push ${{ matrix.target }} uses: docker/bake-action@v2 with: + targets: ${{ matrix.target }} push: true set: | *.args.DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }} *.args.DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }} - *.args.RELEASE_VERSION=${{ steps.version.outputs.version }} + *.args.RELEASE_VERSION=${{ needs.release.outputs.version }} *.args.HUGGINGFACE_ACCESS_TOKEN=${{ secrets.HUGGINGFACE_ACCESS_TOKEN }} + post-release: + needs: [release, docker] + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Update description on Docker Hub uses: peter-evans/dockerhub-description@v3 with: @@ -98,4 +126,4 @@ jobs: - name: Create GitHub release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create "${{ steps.version.outputs.version }}" --generate-notes + run: gh release create "${{ needs.release.outputs.version }}" --generate-notes