|
@@ -27,3 +27,33 @@ jobs:
|
|
|
secrets:
|
|
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+
|
|
|
+ build-universal:
|
|
|
+ needs: [build-amd64, build-arm64]
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - name: Checkout code
|
|
|
+ uses: actions/checkout@v4
|
|
|
+
|
|
|
+ - name: Login to Docker Hub
|
|
|
+ uses: docker/login-action@v2
|
|
|
+ with:
|
|
|
+ username: ${{ secrets.DOCKERHUB_USER }}
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+
|
|
|
+ - name: Extract metadata (tags, labels) for Docker
|
|
|
+ id: meta
|
|
|
+ uses: docker/metadata-action@v5
|
|
|
+ with:
|
|
|
+ images: ${{ vars.DIFY_SANDBOX_IMAGE_NAME || 'langgenius/dify-sandbox' }}
|
|
|
+ tags: |
|
|
|
+ type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
+ type=ref,event=branch
|
|
|
+ type=sha,enable=true,priority=100,prefix=,suffix=,format=long
|
|
|
+ type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
|
|
+
|
|
|
+ - name: Build Universal Docker Image
|
|
|
+ run: docker manifest create ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-amd64 ${{ steps.meta.outputs.tags }}-arm64
|
|
|
+
|
|
|
+ - name: Push Universal Docker Image
|
|
|
+ run: docker manifest push ${{ steps.meta.outputs.tags }}
|