Update dependency e2b (#175) #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and push Desktop template | |
| on: | |
| push: | |
| paths: | |
| - 'template/**' | |
| - '.github/workflows/template.yml' | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| buildAndPublish: | |
| defaults: | |
| run: | |
| working-directory: ./template | |
| name: Build and Push Images | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Parse .tool-versions | |
| uses: wistia/parse-tool-versions@v2.1.1 | |
| id: tool-versions | |
| with: | |
| filename: '.tool-versions' | |
| uppercase: 'true' | |
| prefix: 'tool_version_' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '${{ env.TOOL_VERSION_PYTHON }}' | |
| - name: Install and configure Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: ${{ env.TOOL_VERSION_POETRY }} | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Install dependencies | |
| run: poetry install | |
| - 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: Build and push to DockerHub | |
| run: | | |
| docker pull ${{ secrets.DOCKERHUB_USERNAME }}/desktop:latest || true | |
| poetry run python build_docker.py | docker buildx build \ | |
| --platform linux/amd64 \ | |
| --push \ | |
| --tag ${{ secrets.DOCKERHUB_USERNAME }}/desktop:latest -f - files | |
| - name: Build E2B template | |
| run: poetry run python build_prod.py | |
| env: | |
| E2B_API_KEY: ${{ secrets.E2B_API_KEY }} |