mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +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
|
||||
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
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
|
|
@ -27,26 +31,53 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Run docker-compose build
|
||||
# Prepare Docker Build
|
||||
- name: Build Docker images
|
||||
run: |
|
||||
cp .env.example .env
|
||||
docker-compose build
|
||||
docker build -f Dockerfile.multi --target api-build -t librechat-api .
|
||||
|
||||
# Get Tag Name
|
||||
- name: Get Tag Name
|
||||
id: tag_name
|
||||
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
# Tag and push librechat-api
|
||||
- name: Docker metadata for librechat-api
|
||||
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}}
|
||||
|
||||
# Tag it properly before push to github
|
||||
- name: tag image and push
|
||||
run: |
|
||||
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
|
||||
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
|
||||
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
|
||||
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest
|
||||
- name: Build and librechat-api
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: Dockerfile.multi
|
||||
context: .
|
||||
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: |
|
||||
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