Skip to content

Commit 5ab2843

Browse files
outdated template id deletion
1 parent 5f9554e commit 5ab2843

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/build_test_template.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: Build E2B Template
2323
runs-on: ubuntu-latest
2424
outputs:
25-
template_id: ${{ steps.generate-template-id.outputs.template_id }}
25+
template_id: ${{ steps.build-template.outputs.template_id }}
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
@@ -42,12 +42,12 @@ jobs:
4242
working-directory: ./template
4343
run: pip install -r requirements-dev.txt
4444

45-
- name: Generate Template ID
45+
- name: Generate Template Name
4646
id: generate-template-id
4747
run: |
4848
E2B_TESTS_TEMPLATE=e2b-code-interpreter-ci-$(uuidgen)
49-
echo "Generated Template ID: $E2B_TESTS_TEMPLATE"
50-
echo "template_id=$E2B_TESTS_TEMPLATE" >> $GITHUB_OUTPUT
49+
echo "Generated Template Name: $E2B_TESTS_TEMPLATE"
50+
echo "template_name=$E2B_TESTS_TEMPLATE" >> $GITHUB_OUTPUT
5151
5252
- name: Build E2B template
5353
id: build-template
@@ -57,4 +57,4 @@ jobs:
5757
env:
5858
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
5959
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
60-
E2B_TESTS_TEMPLATE: ${{ steps.generate-template-id.outputs.template_id }}
60+
E2B_TESTS_TEMPLATE: ${{ steps.generate-template-id.outputs.template_name }}

template/build_ci.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
from e2b import Template, default_build_logger
33
from template import make_template
44

5-
Template.build(
5+
build_info = Template.build(
66
make_template(),
77
alias=os.environ["E2B_TESTS_TEMPLATE"],
88
cpu_count=2,
99
memory_mb=2048,
1010
on_build_logs=default_build_logger(),
1111
)
12+
13+
template_id = build_info.template_id
14+
print(f"Built template ID: {template_id}")
15+
16+
github_output = os.getenv("GITHUB_OUTPUT")
17+
if github_output:
18+
with open(github_output, "a", encoding="utf-8") as fh:
19+
fh.write(f"template_id={template_id}\n")

0 commit comments

Comments
 (0)