| if: github.event.pull_request.draft == false | if: github.event.pull_request.draft == false | ||||
| steps: | steps: | ||||
| - name: Set up QEMU | - name: Set up QEMU | ||||
| uses: docker/setup-qemu-action@v2 | |||||
| uses: docker/setup-qemu-action@v3 | |||||
| - name: Set up Docker Buildx | - name: Set up Docker Buildx | ||||
| uses: docker/setup-buildx-action@v2 | |||||
| uses: docker/setup-buildx-action@v3 | |||||
| - name: Login to Docker Hub | - name: Login to Docker Hub | ||||
| uses: docker/login-action@v2 | uses: docker/login-action@v2 | ||||
| - name: Extract metadata (tags, labels) for Docker | - name: Extract metadata (tags, labels) for Docker | ||||
| id: meta | id: meta | ||||
| uses: docker/metadata-action@v4 | |||||
| uses: docker/metadata-action@v5 | |||||
| with: | with: | ||||
| images: langgenius/dify-api | images: langgenius/dify-api | ||||
| tags: | | tags: | | ||||
| type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} | type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} | ||||
| - name: Build and push | - name: Build and push | ||||
| uses: docker/build-push-action@v4 | |||||
| uses: docker/build-push-action@v5 | |||||
| with: | with: | ||||
| context: "{{defaultContext}}:api" | context: "{{defaultContext}}:api" | ||||
| platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} | platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} |
| if: github.event.pull_request.draft == false | if: github.event.pull_request.draft == false | ||||
| steps: | steps: | ||||
| - name: Set up QEMU | - name: Set up QEMU | ||||
| uses: docker/setup-qemu-action@v2 | |||||
| uses: docker/setup-qemu-action@v3 | |||||
| - name: Set up Docker Buildx | - name: Set up Docker Buildx | ||||
| uses: docker/setup-buildx-action@v2 | |||||
| uses: docker/setup-buildx-action@v3 | |||||
| - name: Login to Docker Hub | - name: Login to Docker Hub | ||||
| uses: docker/login-action@v2 | uses: docker/login-action@v2 | ||||
| - name: Extract metadata (tags, labels) for Docker | - name: Extract metadata (tags, labels) for Docker | ||||
| id: meta | id: meta | ||||
| uses: docker/metadata-action@v4 | |||||
| uses: docker/metadata-action@v5 | |||||
| with: | with: | ||||
| images: langgenius/dify-web | images: langgenius/dify-web | ||||
| tags: | | tags: | | ||||
| type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} | type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} | ||||
| - name: Build and push | - name: Build and push | ||||
| uses: docker/build-push-action@v4 | |||||
| uses: docker/build-push-action@v5 | |||||
| with: | with: | ||||
| context: "{{defaultContext}}:web" | context: "{{defaultContext}}:web" | ||||
| platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} | platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} |