|
60 | 60 | platforms: linux/${{ matrix.archs.arch }} |
61 | 61 | labels: | |
62 | 62 | org.opencontainers.image.source=https://github.com/${{ github.repository }} |
63 | | - org.opencontainers.image.description=marketplace image |
64 | | - outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/marketplace,${{ secrets.ALI_IMAGE_NAME }}/marketplace",push-by-digest=true,push=true |
| 63 | + org.opencontainers.image.description=fastgpt-marketplace image |
| 64 | + outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace,${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace",push-by-digest=true,push=true |
65 | 65 | cache-from: type=local,src=/tmp/.buildx-cache |
66 | 66 | cache-to: type=local,dest=/tmp/.buildx-cache |
67 | 67 |
|
@@ -121,26 +121,30 @@ jobs: |
121 | 121 |
|
122 | 122 | - name: Set image name and tag |
123 | 123 | run: | |
124 | | - echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV |
125 | | - echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV |
| 124 | + echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV |
| 125 | + echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV |
126 | 126 |
|
127 | 127 | - name: Create manifest list and push |
128 | 128 | working-directory: ${{ runner.temp }}/digests |
129 | 129 | run: | |
130 | 130 | echo "Pushing image with tag: ${{ env.RANDOM_TAG }}" |
131 | | - TAGS="$(echo -e "${Git_Tag}\n${Ali_Tag}")" |
132 | | - for TAG in $TAGS; do |
133 | | - echo "Creating and pushing manifest for: $TAG" |
134 | | - docker buildx imagetools create -t $TAG \ |
135 | | - $(printf 'ghcr.io/${{ github.repository_owner }}/marketplace@sha256:%s ' *) |
136 | | - if [ $? -eq 0 ]; then |
137 | | - echo "✅ Successfully pushed: $TAG" |
138 | | - else |
139 | | - echo "❌ Failed to push: $TAG" |
140 | | - exit 1 |
141 | | - fi |
142 | | - sleep 5 |
143 | | - done |
| 131 | + echo "Available digests:" |
| 132 | + ls -la |
| 133 | + echo "" |
| 134 | +
|
| 135 | + # Create manifest for GitHub Container Registry |
| 136 | + echo "Creating manifest for GitHub: ${Git_Tag}" |
| 137 | + docker buildx imagetools create -t ${Git_Tag} \ |
| 138 | + $(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace@sha256:%s ' *) |
| 139 | + echo "✅ GitHub manifest created" |
| 140 | + sleep 5 |
| 141 | +
|
| 142 | + # Create manifest for Ali Cloud |
| 143 | + echo "Creating manifest for Ali Cloud: ${Ali_Tag}" |
| 144 | + docker buildx imagetools create -t ${Ali_Tag} \ |
| 145 | + $(printf '${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace@sha256:%s ' *) |
| 146 | + echo "✅ Ali Cloud manifest created" |
| 147 | +
|
144 | 148 | echo "" |
145 | 149 | echo "✅ All images pushed successfully:" |
146 | 150 | echo " - ${{ env.Git_Tag }}" |
|
0 commit comments