@@ -100,6 +100,8 @@ jobs:
100100    needs : [charts-tests] 
101101    if : needs.changes.outputs.charts == 'true' 
102102    runs-on : ubuntu-latest 
103+     outputs :
104+       version : ${{ steps.output_version.outputs.version }} 
103105    steps :
104106      - name : Checkout Repo 
105107        uses : actions/checkout@v3 
@@ -146,12 +148,20 @@ jobs:
146148          GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
147149          PYPI_TOKEN : ${{ secrets.CHARTS_PYPI_TOKEN }} 
148150
151+       - name : Output new version 
152+         id : output_version 
153+         working-directory : ./chart_data_extractor 
154+         run : | 
155+             echo "::set-output name=version::$(pnpm pkg get version --workspaces=false | tr -d \\\")" 
149156
150157build-docker-image :
151158    name : Build Docker Image 
152159    runs-on : ubuntu-latest 
153160    needs : [changes, charts-release] 
154-     if : needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true' 
161+     if : always() && 
162+       !contains(needs.*.result, 'failure') && 
163+       !contains(needs.*.result, 'cancelled') && 
164+       (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true') 
155165    steps :
156166      - name : Checkout repository 
157167        uses : actions/checkout@v3 
@@ -170,6 +180,9 @@ jobs:
170180      - name : Build and push to DockerHub 
171181        working-directory : ./template 
172182        run : | 
183+           CHARTS_VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2) 
184+           VERSION=${{ needs.charts-release.outputs.version || CHARTS_VERSION }} 
185+           sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" Dockerfile 
173186          docker pull ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest || true  
174187          docker buildx build \ 
175188            --file Dockerfile \ 
0 commit comments