Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/split-docker-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"worker-comfyui": patch
---

fix: split Docker builds into separate jobs to avoid running out of disk space
42 changes: 35 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:

outputs:
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
version: ${{ steps.version.outputs.version }}

steps:
- name: Checkout
Expand Down Expand Up @@ -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: >-
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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:
Expand All @@ -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
Loading