From 697bb4546deee88d761aad291e373e4e5b85b9af Mon Sep 17 00:00:00 2001 From: Jonathan Addington Date: Fri, 13 Dec 2024 18:41:19 +0000 Subject: [PATCH] feat: add GitHub Actions workflow for Docker build and push to GHCR --- .github/workflows/deploy-jm.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy-jm.yml diff --git a/.github/workflows/deploy-jm.yml b/.github/workflows/deploy-jm.yml new file mode 100644 index 00000000000..89d0bc4d6ea --- /dev/null +++ b/.github/workflows/deploy-jm.yml @@ -0,0 +1,37 @@ +name: Docker Build and Push to GHCR + +on: + workflow_dispatch: + + push: + branches: + - jm-production + +jobs: + deploy-gh-runner-aci: + runs-on: ubuntu-latest + steps: + # checkout the repo + - name: 'Checkout GitHub Action' + uses: actions/checkout@v4 + ref: jm-production + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to GitHub Docker Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ghcr.io/jmaddington/LibreChat:latest + + - name: Log out from Docker Hub + run: docker logout ghcr.io