diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index dec5eef..009af06 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -4,9 +4,13 @@ on: release: types: - published + workflow_dispatch: {} jobs: - build: + build-and-push: + permissions: + contents: read + packages: write runs-on: ubuntu-latest steps: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index f97f44c..f0650ca 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -13,6 +13,7 @@ on: - "**.yml" - "test/**" - "example-workflows/**" + - "docker/**" workflow_dispatch: {} jobs: @@ -37,14 +38,22 @@ jobs: id: version run: echo "version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT" - - name: Get the PR that was merged into main + - name: Get the title and body from the last merged PR id: pr-output env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | info=$(gh pr list --state merged --limit 1 --json title,body | jq -r '.[0]') - echo "title=$(echo $info | jq '.title')" >> "$GITHUB_OUTPUT" - echo "body=$(echo $info | jq '.body')" >> "$GITHUB_OUTPUT" + { + echo 'title<> "$GITHUB_OUTPUT" + { + echo 'body<> "$GITHUB_OUTPUT" - name: Create a release uses: actions/create-release@v1 diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index e4f3d28..1d607d3 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -11,6 +11,7 @@ on: - "generate-workflow" - "test/**" - "example-workflows/**" + - "docker/**" jobs: build: diff --git a/docker/push-api-images b/docker/push-api-images index 293f378..b40a26a 100755 --- a/docker/push-api-images +++ b/docker/push-api-images @@ -6,10 +6,10 @@ comfy_version=${1:-0.3.10} torch_version=${2:-2.5.0} cuda_version=${3:-12.1} -current_api_version=$(cat package.json | jq -r '.version') +current_api_version=$(cat ../package.json | jq -r '.version') api_version=${4:-$current_api_version} -bases=("runtime" "devel") +bases=("devel" "runtime") for base in "${bases[@]}"; do docker push ghcr.io/saladtechnologies/comfyui-api:comfy$comfy_version-api$api_version-torch$torch_version-cuda$cuda_version-$base