-
Notifications
You must be signed in to change notification settings - Fork 1.4k
37 lines (30 loc) · 1.2 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 (lettaai)
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 lettaai/letta:$CURRENT_VERSION --tag lettaai/letta:latest
docker push lettaai/letta:$CURRENT_VERSION
docker push lettaai/letta:latest