Skip to content

Commit 54f3a42

Browse files
committed
pass image id from docker-build step to build-template
1 parent c1c6e1e commit 54f3a42

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/build_test_template.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
secrets:
66
E2B_TESTS_ACCESS_TOKEN:
77
required: true
8-
DOCKERHUB_USERNAME:
9-
required: true
108
inputs:
119
E2B_DOMAIN:
1210
required: false
@@ -40,12 +38,12 @@ jobs:
4038
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
4139
4240
- name: Build Docker image
41+
id: docker-build
4342
uses: docker/build-push-action@v6
4443
with:
4544
context: ./template
4645
push: false
4746
platforms: linux/amd64
48-
tags: ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest
4947
cache-from: type=gha
5048
cache-to: type=gha,mode=max
5149

@@ -56,7 +54,8 @@ jobs:
5654
id: build-template
5755
run: |
5856
rm -f e2b.toml
59-
e2b template build --memory-mb 1024 -c "/root/.jupyter/start-up.sh" -d "e2b.Dockerfile" | tee build_output.txt
57+
echo "FROM ${{ steps.docker-build.outputs.imageid }}" > test.Dockerfile
58+
e2b template build --memory-mb 1024 -c "/root/.jupyter/start-up.sh" -d "test.Dockerfile" | tee build_output.txt
6059
TEMPLATE_ID=$(grep "Requested build for the sandbox template" build_output.txt | awk '{print $NF}')
6160
echo "Captured Template ID: $TEMPLATE_ID"
6261
echo "template_id=$TEMPLATE_ID" >> $GITHUB_OUTPUT

.github/workflows/pull_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
build-template:
1818
uses: ./.github/workflows/build_test_template.yml
1919
secrets:
20-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
2120
E2B_TESTS_ACCESS_TOKEN: ${{ secrets.E2B_TESTS_ACCESS_TOKEN }}
2221
with:
2322
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}

0 commit comments

Comments
 (0)