Skip to content

Commit 245d6e0

Browse files
authored
fix: action (#5904)
1 parent 3a5318c commit 245d6e0

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

.github/workflows/marketplace-image.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
platforms: linux/${{ matrix.archs.arch }}
6161
labels: |
6262
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
6565
cache-from: type=local,src=/tmp/.buildx-cache
6666
cache-to: type=local,dest=/tmp/.buildx-cache
6767

@@ -121,26 +121,30 @@ jobs:
121121
122122
- name: Set image name and tag
123123
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
126126
127127
- name: Create manifest list and push
128128
working-directory: ${{ runner.temp }}/digests
129129
run: |
130130
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+
144148
echo ""
145149
echo "✅ All images pushed successfully:"
146150
echo " - ${{ env.Git_Tag }}"

0 commit comments

Comments
 (0)