Docker Image CI #31
This file contains 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: Docker Image CI | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
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 | |
- 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 |