Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: oven-sh/setup-bun@v2

Expand All @@ -30,7 +30,7 @@ jobs:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: oven-sh/setup-bun@v2

Expand All @@ -44,7 +44,7 @@ jobs:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: oven-sh/setup-bun@v2

Expand Down
45 changes: 31 additions & 14 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,69 @@ on:
push:
branches:
- main
paths:
- 'src/**'
- 'server.ts'
- 'package.json'
- 'bun.lock'
- 'Dockerfile'
- '.github/workflows/docker-publish.yml'
paths-ignore:
- 'e2e/**'
- 'scripts/**'
- '*.md'
- '.env.example'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Comment thread
danny-avila marked this conversation as resolved.
Resolved
Comment thread
danny-avila marked this conversation as resolved.
Resolved
queue: max

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Check whether main's head still builds this image
id: head
run: |
git fetch --quiet origin main
context=(. ':(exclude)e2e' ':(exclude)scripts' ':(exclude,glob)*.md' ':(exclude).env.example')
latest=false
if [ "$GITHUB_REF" = refs/heads/main ] && git merge-base --is-ancestor "$GITHUB_SHA" FETCH_HEAD; then
changed=$(git log --full-history --format=%H "$GITHUB_SHA..FETCH_HEAD" -- "${context[@]}") || changed=unknown
if [ -z "$changed" ]; then latest=true; fi
fi
echo "latest=$latest" >> "$GITHUB_OUTPUT"

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ghcr.io/librechat-ai/librechat-admin-panel
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest,enable=${{ steps.head.outputs.latest }}
type=sha,format=long,prefix=,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile
Expand Down
Loading