mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +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:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
cleanup: true
|
||||
|
||||
- name: Check CR_PAT secret
|
||||
id: crpat
|
||||
shell: bash
|
||||
@ -68,7 +66,6 @@ jobs:
|
||||
else
|
||||
echo "present=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Login to GHCR with GITHUB_TOKEN
|
||||
if: ${{ steps.crpat.outputs.present == 'false' }}
|
||||
uses: docker/login-action@v3
|
||||
@ -76,7 +73,6 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to GHCR with CR_PAT
|
||||
if: ${{ steps.crpat.outputs.present == 'true' }}
|
||||
uses: docker/login-action@v3
|
||||
@ -84,7 +80,6 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
- name: Build and Push (GH runner)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
@ -105,12 +100,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
cleanup: true
|
||||
|
||||
- name: Check CR_PAT secret
|
||||
id: crpat
|
||||
shell: bash
|
||||
@ -120,7 +113,6 @@ jobs:
|
||||
else
|
||||
echo "present=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Login to GHCR with GITHUB_TOKEN
|
||||
if: ${{ steps.crpat.outputs.present == 'false' }}
|
||||
uses: docker/login-action@v3
|
||||
@ -128,7 +120,6 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to GHCR with CR_PAT
|
||||
if: ${{ steps.crpat.outputs.present == 'true' }}
|
||||
uses: docker/login-action@v3
|
||||
@ -136,7 +127,6 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
- name: Build and Push (self-hosted)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
@ -148,7 +138,7 @@ jobs:
|
||||
${{ env.IMAGE_NAME }}:latest
|
||||
|
||||
publish:
|
||||
name: Update Release and Cleanup
|
||||
name: Update Release
|
||||
needs: [check-tag, build-gh, build-self]
|
||||
if: needs.build-gh.result == 'success' || needs.build-self.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
@ -167,26 +157,6 @@ jobs:
|
||||
draft: 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:
|
||||
name: Finalize Outcome
|
||||
needs: [check-tag, build-gh, build-self, publish]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user