Commit 245d6e0d by Archer Committed by GitHub

fix: action (#5904)

parent 3a5318c0
...@@ -60,8 +60,8 @@ jobs: ...@@ -60,8 +60,8 @@ jobs:
platforms: linux/${{ matrix.archs.arch }} platforms: linux/${{ matrix.archs.arch }}
labels: | labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }} org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=marketplace image org.opencontainers.image.description=fastgpt-marketplace image
outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/marketplace,${{ secrets.ALI_IMAGE_NAME }}/marketplace",push-by-digest=true,push=true outputs: type=image,"name=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace,${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace",push-by-digest=true,push=true
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache
...@@ -121,26 +121,30 @@ jobs: ...@@ -121,26 +121,30 @@ jobs:
- name: Set image name and tag - name: Set image name and tag
run: | run: |
echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV echo "Git_Tag=ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV echo "Ali_Tag=${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace:${{ env.RANDOM_TAG }}" >> $GITHUB_ENV
- name: Create manifest list and push - name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests working-directory: ${{ runner.temp }}/digests
run: | run: |
echo "Pushing image with tag: ${{ env.RANDOM_TAG }}" echo "Pushing image with tag: ${{ env.RANDOM_TAG }}"
TAGS="$(echo -e "${Git_Tag}\n${Ali_Tag}")" echo "Available digests:"
for TAG in $TAGS; do ls -la
echo "Creating and pushing manifest for: $TAG" echo ""
docker buildx imagetools create -t $TAG \
$(printf 'ghcr.io/${{ github.repository_owner }}/marketplace@sha256:%s ' *) # Create manifest for GitHub Container Registry
if [ $? -eq 0 ]; then echo "Creating manifest for GitHub: ${Git_Tag}"
echo "✅ Successfully pushed: $TAG" docker buildx imagetools create -t ${Git_Tag} \
else $(printf 'ghcr.io/${{ github.repository_owner }}/fastgpt-marketplace@sha256:%s ' *)
echo "❌ Failed to push: $TAG" echo "✅ GitHub manifest created"
exit 1
fi
sleep 5 sleep 5
done
# Create manifest for Ali Cloud
echo "Creating manifest for Ali Cloud: ${Ali_Tag}"
docker buildx imagetools create -t ${Ali_Tag} \
$(printf '${{ secrets.ALI_IMAGE_NAME }}/fastgpt-marketplace@sha256:%s ' *)
echo "✅ Ali Cloud manifest created"
echo "" echo ""
echo "✅ All images pushed successfully:" echo "✅ All images pushed successfully:"
echo " - ${{ env.Git_Tag }}" echo " - ${{ env.Git_Tag }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment