From 065049892cc30d47a4f3ff094b0ea3cf092a2fd8 Mon Sep 17 00:00:00 2001 From: clsferguson <48876201+clsferguson@users.noreply.github.com> Date: Tue, 9 Sep 2025 23:03:26 -0600 Subject: [PATCH] Refactor release workflow and remove cleanup steps Removed package cleanup steps and updated release name. --- .github/workflows/build-release.yml | 32 +---------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 9e25ca195..7b5bf0766 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -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]