mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🐋 feat: CI Docker builds for arm64v8 (#1607)
This commit is contained in:
parent
a0dabcc855
commit
367c78f8d2
1 changed files with 49 additions and 18 deletions
67
.github/workflows/container.yml
vendored
67
.github/workflows/container.yml
vendored
|
|
@ -19,6 +19,10 @@ jobs:
|
||||||
- name: Set up Docker
|
- name: Set up Docker
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
# Set up QEMU for cross-platform builds
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-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
|
||||||
|
|
@ -27,26 +31,53 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Run docker-compose build
|
# Prepare Docker Build
|
||||||
- name: Build Docker images
|
- name: Build Docker images
|
||||||
run: |
|
run: |
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
docker-compose build
|
|
||||||
docker build -f Dockerfile.multi --target api-build -t librechat-api .
|
|
||||||
|
|
||||||
# Get Tag Name
|
# Tag and push librechat-api
|
||||||
- name: Get Tag Name
|
- name: Docker metadata for librechat-api
|
||||||
id: tag_name
|
id: meta-librechat-api
|
||||||
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
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}}
|
||||||
|
|
||||||
# Tag it properly before push to github
|
- name: Build and librechat-api
|
||||||
- name: tag image and push
|
uses: docker/build-push-action@v5
|
||||||
run: |
|
with:
|
||||||
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
|
file: Dockerfile.multi
|
||||||
docker push ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
|
context: .
|
||||||
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
|
push: true
|
||||||
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
|
tags: ${{ steps.meta-librechat-api.outputs.tags }}
|
||||||
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
|
platforms: linux/amd64,linux/arm64
|
||||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
|
target: api-build
|
||||||
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
|
|
||||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest
|
# 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: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
|
- 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
|
||||||
|
target: node
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue