Skip to content

Commit

Permalink
Create multiplatform docker images (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSayyah authored Dec 17, 2024
1 parent e19cf81 commit bdc4e88
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:
workflow_dispatch:

jobs:

build:

runs-on: ubuntu-latest

steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -19,19 +17,25 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: actions/checkout@v3
- name: Build and push the Docker image (memgpt)
run: |
# Extract the version number from pyproject.toml using awk
CURRENT_VERSION=$(awk -F '"' '/version =/ { print $2 }' pyproject.toml | head -n 1)
docker build . --file Dockerfile --tag memgpt/letta:$CURRENT_VERSION --tag memgpt/letta:latest
docker push memgpt/letta:$CURRENT_VERSION
docker push memgpt/letta:latest

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- uses: actions/checkout@v3
- name: Build and push the Docker image (letta)
run: |
# Extract the version number from pyproject.toml using awk
CURRENT_VERSION=$(awk -F '"' '/version =/ { print $2 }' pyproject.toml | head -n 1)
docker build . --file Dockerfile --tag letta/letta:$CURRENT_VERSION --tag letta/letta:latest
docker push letta/letta:$CURRENT_VERSION
docker push letta/letta:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract version number
id: extract_version
run: echo "CURRENT_VERSION=$(awk -F '\"' '/version =/ { print $2 }' pyproject.toml | head -n 1)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
letta/letta:${{ env.CURRENT_VERSION }}
letta/letta:latest
memgpt/letta:${{ env.CURRENT_VERSION }}
memgpt/letta:latest

0 comments on commit bdc4e88

Please sign in to comment.