mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-17 22:12:30 +08:00
Refactor release workflow and remove cleanup steps
Removed package cleanup steps and updated release name.
This commit is contained in:
parent
4b9b7ba771
commit
065049892c
32
.github/workflows/build-release.yml
vendored
32
.github/workflows/build-release.yml
vendored
@ -53,12 +53,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
cleanup: true
|
cleanup: true
|
||||||
|
|
||||||
- name: Check CR_PAT secret
|
- name: Check CR_PAT secret
|
||||||
id: crpat
|
id: crpat
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -68,7 +66,6 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "present=false" >> "$GITHUB_OUTPUT"
|
echo "present=false" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Login to GHCR with GITHUB_TOKEN
|
- name: Login to GHCR with GITHUB_TOKEN
|
||||||
if: ${{ steps.crpat.outputs.present == 'false' }}
|
if: ${{ steps.crpat.outputs.present == 'false' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -76,7 +73,6 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to GHCR with CR_PAT
|
- name: Login to GHCR with CR_PAT
|
||||||
if: ${{ steps.crpat.outputs.present == 'true' }}
|
if: ${{ steps.crpat.outputs.present == 'true' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -84,7 +80,6 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.CR_PAT }}
|
password: ${{ secrets.CR_PAT }}
|
||||||
|
|
||||||
- name: Build and Push (GH runner)
|
- name: Build and Push (GH runner)
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@ -105,12 +100,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
cleanup: true
|
cleanup: true
|
||||||
|
|
||||||
- name: Check CR_PAT secret
|
- name: Check CR_PAT secret
|
||||||
id: crpat
|
id: crpat
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -120,7 +113,6 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "present=false" >> "$GITHUB_OUTPUT"
|
echo "present=false" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Login to GHCR with GITHUB_TOKEN
|
- name: Login to GHCR with GITHUB_TOKEN
|
||||||
if: ${{ steps.crpat.outputs.present == 'false' }}
|
if: ${{ steps.crpat.outputs.present == 'false' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -128,7 +120,6 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to GHCR with CR_PAT
|
- name: Login to GHCR with CR_PAT
|
||||||
if: ${{ steps.crpat.outputs.present == 'true' }}
|
if: ${{ steps.crpat.outputs.present == 'true' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -136,7 +127,6 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.CR_PAT }}
|
password: ${{ secrets.CR_PAT }}
|
||||||
|
|
||||||
- name: Build and Push (self-hosted)
|
- name: Build and Push (self-hosted)
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@ -148,7 +138,7 @@ jobs:
|
|||||||
${{ env.IMAGE_NAME }}:latest
|
${{ env.IMAGE_NAME }}:latest
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Update Release and Cleanup
|
name: Update Release
|
||||||
needs: [check-tag, build-gh, build-self]
|
needs: [check-tag, build-gh, build-self]
|
||||||
if: needs.build-gh.result == 'success' || needs.build-self.result == 'success'
|
if: needs.build-gh.result == 'success' || needs.build-self.result == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -167,26 +157,6 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
- name: Select package cleanup token
|
|
||||||
id: pkg_token
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ -n "${{ secrets.CR_PAT }}" ]; then
|
|
||||||
echo "token=${{ secrets.CR_PAT }}" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "token=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Prune untagged GHCR versions (multi-arch safe)
|
|
||||||
uses: dataaxiom/ghcr-cleanup-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ steps.pkg_token.outputs.token }}
|
|
||||||
owner: ${{ github.repository_owner }}
|
|
||||||
repository: ${{ github.event.repository.name }}
|
|
||||||
package: comfyui-docker
|
|
||||||
delete-untagged: true
|
|
||||||
dry-run: false
|
|
||||||
|
|
||||||
finalize:
|
finalize:
|
||||||
name: Finalize Outcome
|
name: Finalize Outcome
|
||||||
needs: [check-tag, build-gh, build-self, publish]
|
needs: [check-tag, build-gh, build-self, publish]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user