e115934061
Publish `@librechat/data-schemas` to NPM / pack (push) Failing after 8s
Publish `@librechat/client` to NPM / pack (push) Failing after 0s
GitNexus Index / index (push) Failing after 1s
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been skipped
Sync Helm Chart Tags / Sync chart tags (push) Failing after 2s
Publish `librechat-data-provider` to NPM / pack (push) Failing after 1s
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Failing after 1s
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Failing after 0s
Sync Helm Chart Tags / Ignore non-main push (push) Has been skipped
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Failing after 1s
Publish `@librechat/client` to NPM / publish-npm (push) Has been cancelled
Publish `librechat-data-provider` to NPM / publish-npm (push) Has been cancelled
GitNexus Index / post-index (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Has been cancelled
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Docker Dev Images Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'api/**'
|
|
- 'client/**'
|
|
- 'packages/**'
|
|
- 'package.json'
|
|
- 'package-lock.json'
|
|
- 'Dockerfile'
|
|
- 'Dockerfile.multi'
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 130
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- target: api-build
|
|
file: Dockerfile.multi
|
|
image_name: librechat-dev-api
|
|
- target: node
|
|
file: Dockerfile
|
|
image_name: librechat-dev
|
|
|
|
steps:
|
|
# Check out the repository
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Set up QEMU
|
|
- name: Set up QEMU
|
|
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
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Login to Docker Hub
|
|
- 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: |
|
|
cp .env.example .env
|
|
|
|
- name: Compute build metadata
|
|
run: |
|
|
echo "BUILD_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
|
|
echo "BUILD_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
|
|
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
|
|
|
# Build and push Docker images for each target
|
|
- name: Build and push Docker images
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ${{ matrix.file }}
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ github.sha }}
|
|
ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:latest
|
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:${{ github.sha }}
|
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image_name }}:latest
|
|
platforms: linux/amd64,linux/arm64
|
|
target: ${{ matrix.target }}
|
|
build-args: |
|
|
BUILD_COMMIT=${{ env.BUILD_COMMIT }}
|
|
BUILD_BRANCH=${{ env.BUILD_BRANCH }}
|
|
BUILD_DATE=${{ env.BUILD_DATE }}
|