From 3a5318c0121e985cd02f4f3fb6761ef2b6823fe3 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Wed, 12 Nov 2025 10:53:31 +0800 Subject: [PATCH] fix: action (#5903) --- .github/workflows/marketplace-image.yml | 24 ++++++++++++++++-------- projects/app/package.json | 2 +- projects/marketplace/.env.template | 1 + 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/marketplace-image.yml b/.github/workflows/marketplace-image.yml index 2dba410ef..c3e5ae781 100644 --- a/.github/workflows/marketplace-image.yml +++ b/.github/workflows/marketplace-image.yml @@ -67,15 +67,15 @@ jobs: - name: Export digest run: | - mkdir -p ${{ runner.temp }}/digests/marketplace + mkdir -p ${{ runner.temp }}/digests digest="${{ steps.build.outputs.digest }}" - touch "${{ runner.temp }}/digests/marketplace/${digest#sha256:}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest uses: actions/upload-artifact@v4 with: name: digests-marketplace-${{ github.sha }}-${{ matrix.archs.arch }} - path: ${{ runner.temp }}/digests/marketplace/* + path: ${{ runner.temp }}/digests/* if-no-files-found: error retention-days: 1 @@ -121,8 +121,8 @@ jobs: - name: Set image name and tag run: | - echo "Git_IMAGE=ghcr.io/${{ github.repository_owner }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV - echo "Ali_IMAGE=${{ secrets.ALI_IMAGE_NAME }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV + echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV + echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV - name: Create manifest list and push working-directory: ${{ runner.temp }}/digests @@ -130,10 +130,18 @@ jobs: echo "Pushing image with tag: ${{ env.RANDOM_TAG }}" TAGS="$(echo -e "${Git_Tag}\n${Ali_Tag}")" for TAG in $TAGS; do + echo "Creating and pushing manifest for: $TAG" docker buildx imagetools create -t $TAG \ $(printf 'ghcr.io/${{ github.repository_owner }}/marketplace@sha256:%s ' *) + if [ $? -eq 0 ]; then + echo "✅ Successfully pushed: $TAG" + else + echo "❌ Failed to push: $TAG" + exit 1 + fi sleep 5 done - echo "✅ Successfully pushed images:" - echo " - ${{ env.Git_IMAGE }}" - echo " - ${{ env.Ali_IMAGE }}" + echo "" + echo "✅ All images pushed successfully:" + echo " - ${{ env.Git_Tag }}" + echo " - ${{ env.Ali_Tag }}" diff --git a/projects/app/package.json b/projects/app/package.json index e1ae1069c..2371d0461 100644 --- a/projects/app/package.json +++ b/projects/app/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "4.14.0", + "version": "4.14.1", "private": false, "scripts": { "dev": "npm run build:workers && next dev", diff --git a/projects/marketplace/.env.template b/projects/marketplace/.env.template index bf56073be..bf02052a5 100644 --- a/projects/marketplace/.env.template +++ b/projects/marketplace/.env.template @@ -1 +1,2 @@ S3_PREFIX=http://localhost:9000/fastgpt-plugins +AUTH_TOKEN=xxxx \ No newline at end of file