Skip to content

Commit d235edc

Browse files
committed
Bump e2b charts version and make sure the latest version is installed
1 parent effbd82 commit d235edc

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
150157
build-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 \

chart_data_extractor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@e2b/data-extractor",
33
"private": true,
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"scripts": {
66
"test": "poetry run pytest -n 4 --verbose -x",
77
"example": "poetry run python3 example.py",

chart_data_extractor/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "e2b-charts"
3-
version = "0.0.0"
3+
version = "0.0.1"
44
description = "Package for extracting data for E2B Code Interpreter"
55
authors = ["e2b <[email protected]>"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)