Skip to content

Commit c0aa8ab

Browse files
committed
Don't skip release if charts released
1 parent 262b615 commit c0aa8ab

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/release.yml

+20-8
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
username: ${{ secrets.DOCKERHUB_USERNAME }}
178178
password: ${{ secrets.DOCKERHUB_TOKEN }}
179179

180-
- name: Build and push to DockerHub
180+
- name: Set package version
181181
working-directory: ./template
182182
run: |
183183
if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
@@ -187,12 +187,24 @@ jobs:
187187
fi
188188
189189
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
196208

197209
build-template:
198210
name: Build E2B template
@@ -238,7 +250,7 @@ jobs:
238250
if: always() &&
239251
!contains(needs.*.result, 'failure') &&
240252
!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')
242254
name: Release
243255
runs-on: ubuntu-latest
244256
steps:

0 commit comments

Comments
 (0)