File tree Expand file tree Collapse file tree 4 files changed +77
-0
lines changed Expand file tree Collapse file tree 4 files changed +77
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Template
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ E2B_API_KEY :
7+ required : true
8+ E2B_DOMAIN :
9+ required : true
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+ build-docker-image :
16+ name : Build Docker Image
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v3
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Set package version
28+ working-directory : ./template
29+ run : |
30+ VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
31+ echo "Version: $VERSION"
32+ sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
33+
34+ - name : Build Docker image
35+ uses : docker/build-push-action@v6
36+ with :
37+ context : ./template
38+ push : false
39+ platforms : linux/amd64
40+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest
41+
42+ build-template :
43+ name : Build E2B template
44+ runs-on : ubuntu-latest
45+ needs : [build-docker-image]
46+ if : always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
47+ steps :
48+ - name : Checkout repository
49+ uses : actions/checkout@v3
50+ with :
51+ fetch-depth : 0
52+
53+ - name : Install E2B CLI
54+ run : npm install -g @e2b/cli
55+
56+ - name : Build e2b
57+ run : e2b template build
58+ working-directory : ./template
59+ env :
60+ E2B_ACCESS_TOKEN : ${{ secrets.E2B_ACCESS_TOKEN }}
61+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
Original file line number Diff line number Diff line change 55 secrets :
66 E2B_API_KEY :
77 required : true
8+ E2B_DOMAIN :
9+ required : true
810
911permissions :
1012 contents : read
4951 run : pnpm test
5052 env :
5153 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
54+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
5255
5356 - name : Install Bun
5457 uses : oven-sh/setup-bun@v2
5962 run : pnpm test:bun
6063 env :
6164 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
65+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
6266
6367 - name : Install Deno
6468 uses : denoland/setup-deno@v1
6973 run : pnpm test:deno
7074 env :
7175 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
76+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
Original file line number Diff line number Diff line change 1414 - main
1515
1616jobs :
17+ build-template :
18+ uses : ./.github/workflows/build_template.yml
19+ secrets :
20+ E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
21+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
1722 js-sdk :
1823 uses : ./.github/workflows/js_tests.yml
1924 secrets :
2025 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
26+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
2127 python-sdk :
2228 uses : ./.github/workflows/python_tests.yml
2329 secrets :
2430 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
31+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
2532 charts-tests :
2633 uses : ./.github/workflows/charts_tests.yml
34+ secrets :
35+ E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
36+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
Original file line number Diff line number Diff line change 4343 run : poetry run pytest --verbose -x
4444 env :
4545 E2B_API_KEY : ${{ secrets.E2B_API_KEY }}
46+ E2B_DOMAIN : ${{ secrets.E2B_DOMAIN }}
You can’t perform that action at this time.
0 commit comments