53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Build and push prepared templates
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
buildAndPushImage:
|
|
defaults:
|
|
run:
|
|
working-directory: ./templates/base
|
|
|
|
name: Build and Push Image to DockerHub
|
|
runs-on: ubuntu-22.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
|
|
run: |
|
|
docker buildx build \
|
|
--file e2b.Dockerfile \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--push \
|
|
--tag ${{ secrets.DOCKERHUB_USERNAME }}/base:latest .
|
|
|
|
buildTemplate:
|
|
name: Build and Publish E2B Template
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build and install E2B CLI
|
|
uses: ./.github/actions/build-cli
|
|
|
|
- name: Build and publish base template
|
|
working-directory: ./templates/base
|
|
env:
|
|
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
|
|
run: e2b template create base --memory-mb 512
|