Skip to content

Commit 41b157d

Browse files
committed
remove temp changes to test release workflow
1 parent 7b172d8 commit 41b157d

File tree

1 file changed

+66
-68
lines changed

1 file changed

+66
-68
lines changed

.github/workflows/release.yml

Lines changed: 66 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
# Remove after testing
8-
- generate-api-reference-for-code-interpreter-sdk-e2b-1235
97

108
concurrency: ${{ github.workflow }}-${{ github.ref }}
119

@@ -156,74 +154,74 @@ jobs:
156154
run: |
157155
echo "::set-output name=version::$(pnpm pkg get version --workspaces=false | tr -d \\\")"
158156
159-
#build-docker-image:
160-
# name: Build Docker Image
161-
# runs-on: ubuntu-latest
162-
# needs: [changes, charts-release]
163-
# if: always() &&
164-
# !contains(needs.*.result, 'failure') &&
165-
# !contains(needs.*.result, 'cancelled') &&
166-
# (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
167-
# steps:
168-
# - name: Checkout repository
169-
# uses: actions/checkout@v3
170-
# with:
171-
# fetch-depth: 0
172-
173-
# - name: Set up Docker Buildx
174-
# uses: docker/setup-buildx-action@v3
175-
176-
# - name: Log in to DockerHub
177-
# uses: docker/login-action@v3
178-
# with:
179-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
180-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
181-
182-
# - name: Set package version
183-
# working-directory: ./template
184-
# run: |
185-
# if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
186-
# VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
187-
# else
188-
# VERSION=${{ needs.charts-release.outputs.version }}
189-
# fi
190-
# echo "Version: $VERSION"
191-
192-
# sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
193-
194-
# - name: Build Docker image
195-
# uses: docker/build-push-action@v6
196-
# with:
197-
# context: ./template
198-
# push: true
199-
# platforms: linux/amd64
200-
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest
201-
202-
#build-template:
203-
# name: Build E2B template
204-
# runs-on: ubuntu-latest
205-
# needs: [build-docker-image]
206-
# if: always() &&
207-
# !contains(needs.*.result, 'failure') &&
208-
# !contains(needs.*.result, 'cancelled') &&
209-
# needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true'
210-
# steps:
211-
# - name: Checkout repository
212-
# uses: actions/checkout@v3
213-
# with:
214-
# fetch-depth: 0
215-
# - name: Install E2B CLI
216-
# run: npm install -g @e2b/cli
217-
218-
# - name: Build e2b
219-
# run: e2b template build
220-
# working-directory: ./template
221-
# env:
222-
# E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
157+
build-docker-image:
158+
name: Build Docker Image
159+
runs-on: ubuntu-latest
160+
needs: [changes, charts-release]
161+
if: always() &&
162+
!contains(needs.*.result, 'failure') &&
163+
!contains(needs.*.result, 'cancelled') &&
164+
(needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
165+
steps:
166+
- name: Checkout repository
167+
uses: actions/checkout@v3
168+
with:
169+
fetch-depth: 0
170+
171+
- name: Set up Docker Buildx
172+
uses: docker/setup-buildx-action@v3
173+
174+
- name: Log in to DockerHub
175+
uses: docker/login-action@v3
176+
with:
177+
username: ${{ secrets.DOCKERHUB_USERNAME }}
178+
password: ${{ secrets.DOCKERHUB_TOKEN }}
179+
180+
- name: Set package version
181+
working-directory: ./template
182+
run: |
183+
if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
184+
VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
185+
else
186+
VERSION=${{ needs.charts-release.outputs.version }}
187+
fi
188+
echo "Version: $VERSION"
189+
190+
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
191+
192+
- name: Build Docker image
193+
uses: docker/build-push-action@v6
194+
with:
195+
context: ./template
196+
push: true
197+
platforms: linux/amd64
198+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest
199+
200+
build-template:
201+
name: Build E2B template
202+
runs-on: ubuntu-latest
203+
needs: [build-docker-image]
204+
if: always() &&
205+
!contains(needs.*.result, 'failure') &&
206+
!contains(needs.*.result, 'cancelled') &&
207+
needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true'
208+
steps:
209+
- name: Checkout repository
210+
uses: actions/checkout@v3
211+
with:
212+
fetch-depth: 0
213+
- name: Install E2B CLI
214+
run: npm install -g @e2b/cli
215+
216+
- name: Build e2b
217+
run: e2b template build
218+
working-directory: ./template
219+
env:
220+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
223221

224222
python-tests:
225223
name: Python Tests
226-
needs: [changes] #, build-template]
224+
needs: [changes, build-template]
227225
if: always() &&
228226
!contains(needs.*.result, 'failure') &&
229227
!contains(needs.*.result, 'cancelled') &&
@@ -233,7 +231,7 @@ jobs:
233231

234232
js-tests:
235233
name: JS Tests
236-
needs: [changes] #, build-template]
234+
needs: [changes, build-template]
237235
if: always() &&
238236
!contains(needs.*.result, 'failure') &&
239237
!contains(needs.*.result, 'cancelled') &&

0 commit comments

Comments
 (0)