Skip to content

Commit

Permalink
temporarily disable docker and template build for workflow testing pu…
Browse files Browse the repository at this point in the history
…rposes
  • Loading branch information
0div committed Nov 27, 2024
1 parent 1fcacd9 commit 7b172d8
Showing 1 changed file with 66 additions and 66 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,74 +156,74 @@ jobs:
run: |
echo "::set-output name=version::$(pnpm pkg get version --workspaces=false | tr -d \\\")"
build-docker-image:
name: Build Docker Image
runs-on: ubuntu-latest
needs: [changes, charts-release]
if: always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
(needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set package version
working-directory: ./template
run: |
if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
else
VERSION=${{ needs.charts-release.outputs.version }}
fi
echo "Version: $VERSION"
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: ./template
push: true
platforms: linux/amd64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest

build-template:
name: Build E2B template
runs-on: ubuntu-latest
needs: [build-docker-image]
if: always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install E2B CLI
run: npm install -g @e2b/cli

- name: Build e2b
run: e2b template build
working-directory: ./template
env:
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
#build-docker-image:
# name: Build Docker Image
# runs-on: ubuntu-latest
# needs: [changes, charts-release]
# if: always() &&
# !contains(needs.*.result, 'failure') &&
# !contains(needs.*.result, 'cancelled') &&
# (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - name: Log in to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Set package version
# working-directory: ./template
# run: |
# if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
# VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
# else
# VERSION=${{ needs.charts-release.outputs.version }}
# fi
# echo "Version: $VERSION"

# sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt

# - name: Build Docker image
# uses: docker/build-push-action@v6
# with:
# context: ./template
# push: true
# platforms: linux/amd64
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest

#build-template:
# name: Build E2B template
# runs-on: ubuntu-latest
# needs: [build-docker-image]
# if: always() &&
# !contains(needs.*.result, 'failure') &&
# !contains(needs.*.result, 'cancelled') &&
# needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true'
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Install E2B CLI
# run: npm install -g @e2b/cli

# - name: Build e2b
# run: e2b template build
# working-directory: ./template
# env:
# E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}

python-tests:
name: Python Tests
needs: [changes, build-template]
needs: [changes] #, build-template]
if: always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
Expand All @@ -233,7 +233,7 @@ jobs:

js-tests:
name: JS Tests
needs: [changes, build-template]
needs: [changes] #, build-template]
if: always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
Expand Down

0 comments on commit 7b172d8

Please sign in to comment.