mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 20:30:13 +01:00
83 lines
No EOL
2.3 KiB
YAML
83 lines
No EOL
2.3 KiB
YAML
name: Docker Compose Build on Tag
|
|
|
|
# The workflow is triggered when a tag is pushed
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Check out the repository
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Set up Docker
|
|
- 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
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Prepare Docker Build
|
|
- name: Build Docker images
|
|
run: |
|
|
cp .env.example .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}}
|
|
|
|
- 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 |