mirror of
https://github.com/langgenius/dify.git
synced 2026-08-29 03:45:08 +08:00
feat(ci): sync E2B template on release tag push (#40858)
This commit is contained in:
@@ -229,3 +229,32 @@ jobs:
|
||||
IMAGE_VERSION: ${{ steps.meta.outputs.version }}
|
||||
run: |
|
||||
docker buildx imagetools inspect "$IMAGE_NAME:$IMAGE_VERSION"
|
||||
|
||||
sync-e2b-template:
|
||||
needs: create-manifest
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'langgenius/dify' && startsWith(github.ref, 'refs/tags/')
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- project: dev
|
||||
api_key_secret: E2B_API_KEY_DEV
|
||||
- project: prod
|
||||
api_key_secret: E2B_API_KEY_PROD
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
username: ${{ env.DOCKERHUB_USER }}
|
||||
password: ${{ env.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Sync E2B Template (${{ matrix.project }})
|
||||
env:
|
||||
E2B_API_KEY: ${{ secrets[matrix.api_key_secret] }}
|
||||
run: ./dify-agent-runtime/docker/sync-e2b-template.sh
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: build clean test lint gen-cli-help integration integration-up integration-test integration-down
|
||||
.PHONY: build clean test lint gen-cli-help integration integration-up integration-test integration-down sync-e2b-template-dev sync-e2b-template-prod sync-e2b-template-dry-run
|
||||
BIN_DIR := bin
|
||||
AGENT_CLI_HELP_JSON := ../dify-agent/src/dify_agent/layers/_agent_cli_help.json
|
||||
|
||||
@@ -128,3 +128,18 @@ integration:
|
||||
@$(MAKE) integration-up
|
||||
@trap '$(MAKE) integration-down' EXIT; \
|
||||
$(MAKE) integration-test
|
||||
|
||||
# --- E2B Template sync ---
|
||||
#
|
||||
# Both E2B projects publish the same template name (dify-agent-local-sandbox);
|
||||
# the project itself is the isolation boundary. Export E2B_API_KEY_DEV /
|
||||
# E2B_API_KEY_PROD in your shell before running the non-dry-run targets.
|
||||
|
||||
sync-e2b-template-dry-run:
|
||||
./docker/sync-e2b-template.sh --dry-run
|
||||
|
||||
sync-e2b-template-dev:
|
||||
E2B_API_KEY=$(E2B_API_KEY_DEV) ./docker/sync-e2b-template.sh
|
||||
|
||||
sync-e2b-template-prod:
|
||||
E2B_API_KEY=$(E2B_API_KEY_PROD) ./docker/sync-e2b-template.sh
|
||||
|
||||
Reference in New Issue
Block a user