Skip to content

Commit

Permalink
Add GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Mar 11, 2024
1 parent 46894b6 commit a47ce96
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and push Code Interpreter templates

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-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3

- 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 buildx build \
--file e2b.Dockerfile \
--platform linux/amd64,linux/arm64 \
--push \
--tag ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest .
- name: Build e2b
run: e2b template build
env:
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}

0 comments on commit a47ce96

Please sign in to comment.