v0.7.0 (#2266)

*  v0.7.0

* chore: gitignore

* 🐳 ci: update release image workflows
This commit is contained in:
Danny Avila 2024-04-01 15:48:57 -04:00 committed by GitHub
parent aff219c655
commit 5c8b16fbaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 80 additions and 75 deletions

View file

@ -1,28 +1,36 @@
name: Docker Compose Build on Tag name: Docker Images Build on Tag
# The workflow is triggered when a tag is pushed
on: on:
push: push:
tags: tags:
- "*" - 'v*'
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: api-build
file: Dockerfile.multi
image_name: librechat-api
- target: node
file: Dockerfile
image_name: librechat
steps: steps:
# Check out the repository # Check out the repository
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
# Set up Docker # Set up QEMU
- name: Set up Docker
uses: docker/setup-buildx-action@v3
# Set up QEMU for cross-platform builds
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Log in to GitHub Container Registry # Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v2 uses: docker/login-action@v2
@ -31,53 +39,29 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
# Prepare Docker Build # Login to Docker Hub
- name: Build Docker images - name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Prepare the environment
- name: Prepare environment
run: | run: |
cp .env.example .env cp .env.example .env
# Tag and push librechat-api # Build and push Docker images for each target
- name: Docker metadata for librechat-api - name: Build and push Docker images
id: meta-librechat-api
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/librechat-api
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and librechat-api
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
file: Dockerfile.multi
context: . context: .
file: ${{ matrix.file }}
push: true push: true
tags: ${{ steps.meta-librechat-api.outputs.tags }}
platforms: linux/amd64,linux/arm64
target: api-build
# Tag and push librechat
- name: Docker metadata for librechat
id: meta-librechat
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/librechat
tags: | tags: |
type=raw,value=latest ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ github.ref_name }}
type=semver,pattern={{version}} ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:latest
type=semver,pattern={{major}} ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:${{ github.ref_name }}
type=semver,pattern={{major}}.{{minor}} ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:latest
- name: Build and librechat
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
push: true
tags: ${{ steps.meta-librechat.outputs.tags }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
target: node target: ${{ matrix.target }}

View file

@ -1,12 +1,20 @@
name: Docker Compose Build Latest Main Image Tag (Manual Dispatch) name: Docker Compose Build Latest Main Image Tag (Manual Dispatch)
# The workflow is manually triggered
on: on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: api-build
file: Dockerfile.multi
image_name: librechat-api
- target: node
file: Dockerfile
image_name: librechat
steps: steps:
- name: Checkout - name: Checkout
@ -30,26 +38,29 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
# Docker metadata for librechat # Login to Docker Hub
- name: Docker metadata for librechat - name: Login to Docker Hub
id: meta-librechat uses: docker/login-action@v3
uses: docker/metadata-action@v5
with: with:
images: ghcr.io/${{ github.repository_owner }}/librechat username: ${{ secrets.DOCKERHUB_USERNAME }}
tags: | password: ${{ secrets.DOCKERHUB_TOKEN }}
type=raw,value=${{ env.LATEST_TAG }},enable=true
type=raw,value=latest,enable=true
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# Build and push librechat with only linux/amd64 platform # Prepare the environment
- name: Build and push librechat - name: Prepare environment
run: |
cp .env.example .env
# Build and push Docker images for each target
- name: Build and push Docker images
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
file: Dockerfile
context: . context: .
file: ${{ matrix.file }}
push: true push: true
tags: ${{ steps.meta-librechat.outputs.tags }} tags: |
platforms: linux/amd64 ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ env.LATEST_TAG }}
target: node ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:${{ env.LATEST_TAG }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:latest
platforms: linux/amd64,linux/arm64
target: ${{ matrix.target }}

5
.gitignore vendored
View file

@ -93,4 +93,7 @@ auth.json
!client/src/components/Nav/SettingsTabs/Data/ !client/src/components/Nav/SettingsTabs/Data/
# User uploads # User uploads
uploads/ uploads/
# owner
release/

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh # v0.7.0
#!/usr/bin/env sh
set -e set -e
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
[ -n "$CI" ] && exit 0 [ -n "$CI" ] && exit 0

View file

@ -1,3 +1,5 @@
# v0.7.0
# Base node image # Base node image
FROM node:18-alpine AS node FROM node:18-alpine AS node

View file

@ -1,3 +1,5 @@
# v0.7.0
# Build API, Client and Data Provider # Build API, Client and Data Provider
FROM node:20-alpine AS base FROM node:20-alpine AS base

View file

@ -1,4 +1,5 @@
import React from 'react'; import React from 'react';
import { Constants } from 'librechat-data-provider';
import { useGetStartupConfig } from 'librechat-data-provider/react-query'; import { useGetStartupConfig } from 'librechat-data-provider/react-query';
import { useLocalize } from '~/hooks'; import { useLocalize } from '~/hooks';
@ -38,7 +39,7 @@ export default function Footer() {
) : ( ) : (
<> <>
<a href="https://librechat.ai" target="_blank" rel="noreferrer" className="underline"> <a href="https://librechat.ai" target="_blank" rel="noreferrer" className="underline">
{config?.appTitle || 'LibreChat'} v0.6.10 {config?.appTitle || 'LibreChat'} {Constants.VERSION}
</a> </a>
{' - '} {localize('com_ui_new_footer')} {' - '} {localize('com_ui_new_footer')}
</> </>

View file

@ -1,3 +1,4 @@
import { Constants } from 'librechat-data-provider';
import { useGetStartupConfig } from 'librechat-data-provider/react-query'; import { useGetStartupConfig } from 'librechat-data-provider/react-query';
import { useLocalize } from '~/hooks'; import { useLocalize } from '~/hooks';
@ -12,7 +13,7 @@ export default function Footer() {
) : ( ) : (
<> <>
<a href="https://librechat.ai" target="_blank" rel="noreferrer" className="underline"> <a href="https://librechat.ai" target="_blank" rel="noreferrer" className="underline">
{config?.appTitle || 'LibreChat'} v0.6.10 {config?.appTitle || 'LibreChat'} {Constants.VERSION}
</a> </a>
{' - '}. {localize('com_ui_pay_per_call')} {' - '}. {localize('com_ui_pay_per_call')}
</> </>

View file

@ -1,3 +1,3 @@
// v0.6.10 // v0.7.0
// See .env.test.example for an example of the '.env.test' file. // See .env.test.example for an example of the '.env.test' file.
require('dotenv').config({ path: './e2e/.env.test' }); require('dotenv').config({ path: './e2e/.env.test' });

View file

@ -1,4 +1,4 @@
<!-- v0.6.10 --> <!-- v0.7.0 -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>

View file

@ -521,7 +521,7 @@ export enum Constants {
/** /**
* Key for the app's version. * Key for the app's version.
*/ */
VERSION = 'v0.6.10', VERSION = 'v0.7.0',
/** /**
* Key for the Custom Config's version (librechat.yaml). * Key for the Custom Config's version (librechat.yaml).
*/ */

View file

@ -1,4 +1,4 @@
// v0.6.10 // v0.7.0
module.exports = { module.exports = {
tailwindConfig: './client/tailwind.config.cjs', tailwindConfig: './client/tailwind.config.cjs',
printWidth: 100, printWidth: 100,