Skip to content
Open
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
7 changes: 7 additions & 0 deletions .changeset/ci-build-on-pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"worker-comfyui": patch
---

ci: build base image on every pull request so PR changes are testable before merge

Previously the `Development` workflow only ran on manual `workflow_dispatch`, and `release.yml` only built images after a `chore: version packages` commit landed on `main`. That meant fixes couldn't be deployed and tested on a real Runpod endpoint until they were already merged. With this change, opening or pushing to a PR builds and pushes a `base` image tagged with the branch slug (e.g. `:fix-pin-boto3`), so reviewers can deploy that exact image to a serverless endpoint and verify behavior before approval.
15 changes: 11 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: Development

on:
workflow_dispatch:
# push:
# branches-ignore:
# - main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "docs/**"
- ".changeset/**"

jobs:
dev:
Expand Down Expand Up @@ -42,7 +45,11 @@ jobs:
echo "DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }}" >> $GITHUB_ENV
echo "DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }}" >> $GITHUB_ENV
echo "HUGGINGFACE_ACCESS_TOKEN=${{ secrets.HUGGINGFACE_ACCESS_TOKEN }}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF##refs/heads/}" | sed 's/\//-/g' >> $GITHUB_ENV
# On pull_request: GITHUB_HEAD_REF is the source branch (e.g. fix/foo).
# On workflow_dispatch / push: fall back to the ref's branch name.
BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF##refs/heads/}}"
BRANCH_SLUG=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9._-]/-/g')
echo "RELEASE_VERSION=${BRANCH_SLUG}" >> $GITHUB_ENV

- name: Build and push the base image to Docker Hub
uses: docker/bake-action@v2
Expand Down
Loading