Skip to content

Commit 5bd183f

Browse files
template has skip_cache option
1 parent 524ffc8 commit 5bd183f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/build_prod_template.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Build Prod Template
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
skip_cache:
7+
description: Skip build cache
8+
required: false
9+
type: boolean
10+
default: false
511

612
permissions:
713
contents: read
@@ -29,3 +35,4 @@ jobs:
2935
env:
3036
E2B_API_KEY: ${{ secrets.E2B_PROD_API_KEY }}
3137
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
38+
SKIP_CACHE: ${{ inputs.skip_cache }}

template/build_prod.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1+
import os
2+
13
from dotenv import load_dotenv
24
from e2b import Template, default_build_logger
35
from template import make_template
46

57
load_dotenv()
68

9+
skip_cache = os.getenv("SKIP_CACHE", "false").lower() == "true"
10+
711
Template.build(
812
make_template(),
913
alias="code-interpreter-v1",
1014
cpu_count=2,
1115
memory_mb=2048,
16+
skip_cache=skip_cache,
1217
on_build_logs=default_build_logger(),
1318
)

0 commit comments

Comments
 (0)