Skip to content

Commit

Permalink
feat: create docker-image.yml (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Mar 21, 2024
1 parent 464bda4 commit df67b26
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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
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/memgpt-server:$CURRENT_VERSION
docker push memgpt/memgpt-server:$CURRENT_VERSION

0 comments on commit df67b26

Please sign in to comment.