mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 12:20:14 +01:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Docker Compose Build Latest Main Image Tag (Manual Dispatch)
|
|
|
|
# The workflow is manually triggered
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Fetch tags and set the latest tag
|
|
run: |
|
|
git fetch --tags
|
|
echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
|
|
|
|
- name: Set up Docker
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Docker metadata for 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=${{ 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
|
|
- name: Build and push librechat
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
file: Dockerfile
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta-librechat.outputs.tags }}
|
|
platforms: linux/amd64
|
|
target: node
|