Skip to content

Commit a47ce96

Browse files
committed
Add GitHub action
1 parent 46894b6 commit a47ce96

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/template.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and push Code Interpreter templates
2+
3+
on:
4+
push:
5+
paths:
6+
- 'template/**'
7+
- '.github/workflows/template.yml'
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
buildAndPublish:
16+
defaults:
17+
run:
18+
working-directory: ./template
19+
20+
name: Build and Push Images
21+
runs-on: ubuntu-20.04
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Log in to DockerHub
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
35+
- name: Build and push to DockerHub
36+
run: |
37+
docker buildx build \
38+
--file e2b.Dockerfile \
39+
--platform linux/amd64,linux/arm64 \
40+
--push \
41+
--tag ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest .
42+
43+
44+
- name: Build e2b
45+
run: e2b template build
46+
env:
47+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)