Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
chore(ci): move image builds to depot (#35575)
Luyu Zhang23648141c9f8
diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.ymlindex b78f3087368..2d8bde8080c 100644--- a/.github/workflows/build-push.yml+++ b/.github/workflows/build-push.yml@@ -26,6 +26,9 @@ jobs:build:runs-on: ${{ matrix.runs_on }}if: github.repository == 'langgenius/dify'+ permissions:+ contents: read+ id-token: writestrategy:matrix:include:@@ -42,7 +45,7 @@ jobs:build_context: "{{defaultContext}}:api"file: "Dockerfile"platform: linux/arm64- runs_on: ubuntu-24.04-arm+ runs_on: depot-ubuntu-24.04-4- service_name: "build-web-amd64"image_name_env: "DIFY_WEB_IMAGE_NAME"artifact_context: "web"@@ -56,7 +59,7 @@ jobs:build_context: "{{defaultContext}}"file: "web/Dockerfile"platform: linux/arm64- runs_on: ubuntu-24.04-arm+ runs_on: depot-ubuntu-24.04-4steps:- name: Prepare@@ -70,8 +73,8 @@ jobs:username: ${{ env.DOCKERHUB_USER }}password: ${{ env.DOCKERHUB_TOKEN }}- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0+ - name: Set up Depot CLI+ uses: depot/setup-action@v1- name: Extract metadata for Dockerid: meta@@ -81,16 +84,15 @@ jobs:- name: Build Docker imageid: build- uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0+ uses: depot/build-push-action@v1with:+ project: ${{ vars.DEPOT_PROJECT_ID }}context: ${{ matrix.build_context }}file: ${{ matrix.file }}platforms: ${{ matrix.platform }}build-args: COMMIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}labels: ${{ steps.meta.outputs.labels }}outputs: type=image,name=${{ env[matrix.image_name_env] }},push-by-digest=true,name-canonical=true,push=true- cache-from: type=gha,scope=${{ matrix.service_name }}- cache-to: type=gha,mode=max,scope=${{ matrix.service_name }}- name: Export digestenv:@@ -108,6 +110,30 @@ jobs:if-no-files-found: errorretention-days: 1+ fork-build-validate:+ if: github.repository != 'langgenius/dify'+ runs-on: ubuntu-24.04+ strategy:+ matrix:+ include:+ - service_name: "validate-api-amd64"+ build_context: "{{defaultContext}}:api"+ file: "Dockerfile"+ - service_name: "validate-web-amd64"+ build_context: "{{defaultContext}}"+ file: "web/Dockerfile"+ steps:+ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@98e3b2c9eab4f4f98a95c0c0a3ea5e5e672fd2a8 # v3.10.0++ - name: Validate Docker image+ uses: docker/build-push-action@5cd29d66b4a8d8e6f4d5dfe2e9329f0b1d446289 # v6.18.0+ with:+ push: false+ context: ${{ matrix.build_context }}+ file: ${{ matrix.file }}+ platforms: linux/amd64+create-manifest:needs: buildruns-on: depot-ubuntu-24.04diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymlindex c02816b979d..b0022b863bb 100644--- a/.github/workflows/docker-build.yml+++ b/.github/workflows/docker-build.yml@@ -14,7 +14,11 @@ concurrency:jobs:build-docker:+ if: github.event.pull_request.head.repo.full_name == github.repositoryruns-on: ${{ matrix.runs_on }}+ permissions:+ contents: read+ id-token: writestrategy:matrix:include:@@ -25,7 +29,7 @@ jobs:file: "Dockerfile"- service_name: "api-arm64"platform: linux/arm64- runs_on: ubuntu-24.04-arm+ runs_on: depot-ubuntu-24.04-4context: "{{defaultContext}}:api"file: "Dockerfile"- service_name: "web-amd64"@@ -35,19 +39,44 @@ jobs:file: "web/Dockerfile"- service_name: "web-arm64"platform: linux/arm64- runs_on: ubuntu-24.04-arm+ runs_on: depot-ubuntu-24.04-4context: "{{defaultContext}}"file: "web/Dockerfile"steps:- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0+ - name: Set up Depot CLI+ uses: depot/setup-action@v1- name: Build Docker Image- uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0+ uses: depot/build-push-action@v1with:+ project: ${{ vars.DEPOT_PROJECT_ID }}push: falsecontext: ${{ matrix.context }}file: ${{ matrix.file }}platforms: ${{ matrix.platform }}- cache-from: type=gha- cache-to: type=gha,mode=max++ build-docker-fork:+ if: github.event.pull_request.head.repo.full_name != github.repository+ runs-on: ubuntu-24.04+ permissions:+ contents: read+ strategy:+ matrix:+ include:+ - service_name: "api-amd64"+ context: "{{defaultContext}}:api"+ file: "Dockerfile"+ - service_name: "web-amd64"+ context: "{{defaultContext}}"+ file: "web/Dockerfile"+ steps:+ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@98e3b2c9eab4f4f98a95c0c0a3ea5e5e672fd2a8 # v3.10.0++ - name: Build Docker Image+ uses: docker/build-push-action@5cd29d66b4a8d8e6f4d5dfe2e9329f0b1d446289 # v6.18.0+ with:+ push: false+ context: ${{ matrix.context }}+ file: ${{ matrix.file }}+ platforms: linux/amd64diff --git a/depot.json b/depot.jsonnew file mode 100644index 00000000000..1c8a32f1306--- /dev/null+++ b/depot.json@@ -0,0 +1 @@+{"id":"smkxz53ddb"}