@@ -177,7 +177,7 @@ jobs:
177
177
username : ${{ secrets.DOCKERHUB_USERNAME }}
178
178
password : ${{ secrets.DOCKERHUB_TOKEN }}
179
179
180
- - name : Build and push to DockerHub
180
+ - name : Set package version
181
181
working-directory : ./template
182
182
run : |
183
183
if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
@@ -187,12 +187,24 @@ jobs:
187
187
fi
188
188
189
189
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
190
- docker pull ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest || true
191
- docker buildx build \
192
- --file Dockerfile \
193
- --platform linux/amd64 \
194
- --push \
195
- --tag ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest .
190
+
191
+ - name : Cache Docker layers
192
+ uses : actions/cache@v3
193
+ with :
194
+ path : /tmp/.buildx-cache
195
+ key : ${{ runner.os }}-buildx-${{ github.sha }}
196
+ restore-keys : |
197
+ ${{ runner.os }}-buildx-
198
+
199
+ - name : Build Docker image
200
+ uses : docker/build-push-action@v6
201
+ with :
202
+ context : ./template
203
+ push : true
204
+ platforms : linux/amd64
205
+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest
206
+ cache-from : type=local,src=/tmp/.buildx-cache
207
+ cache-to : type=local,dest=/tmp/.buildx-cache,mode=max
196
208
197
209
build-template :
198
210
name : Build E2B template
@@ -238,7 +250,7 @@ jobs:
238
250
if : always() &&
239
251
!contains(needs.*.result, 'failure') &&
240
252
!contains(needs.*.result, 'cancelled') &&
241
- (needs.changes.outputs.js == 'true' || needs.changes.outputs.python == 'true')
253
+ (needs.changes.outputs.js == 'true' || needs.changes.outputs.python == 'true' || needs.changes.outputs.charts == 'true' )
242
254
name : Release
243
255
runs-on : ubuntu-latest
244
256
steps :
0 commit comments