@@ -100,6 +100,8 @@ jobs:
100
100
needs : [charts-tests]
101
101
if : needs.changes.outputs.charts == 'true'
102
102
runs-on : ubuntu-latest
103
+ outputs :
104
+ version : ${{ steps.output_version.outputs.version }}
103
105
steps :
104
106
- name : Checkout Repo
105
107
uses : actions/checkout@v3
@@ -146,12 +148,20 @@ jobs:
146
148
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147
149
PYPI_TOKEN : ${{ secrets.CHARTS_PYPI_TOKEN }}
148
150
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 \\\")"
149
156
150
157
build-docker-image :
151
158
name : Build Docker Image
152
159
runs-on : ubuntu-latest
153
160
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')
155
165
steps :
156
166
- name : Checkout repository
157
167
uses : actions/checkout@v3
@@ -170,6 +180,9 @@ jobs:
170
180
- name : Build and push to DockerHub
171
181
working-directory : ./template
172
182
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
173
186
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest || true
174
187
docker buildx build \
175
188
--file Dockerfile \
0 commit comments