Skip to content

Commit 5de4573

Browse files
authored
🐳 feat: Add GHCR Docker Image Publish Workflow (#16)
1 parent 542e79e commit 5de4573

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Docker Image Publish
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- 'src/**'
10+
- 'server.ts'
11+
- 'package.json'
12+
- 'bun.lock'
13+
- 'Dockerfile'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Log in to GitHub Container Registry
33+
uses: docker/login-action@v3
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Build and push
40+
uses: docker/build-push-action@v6
41+
with:
42+
context: .
43+
file: Dockerfile
44+
push: true
45+
tags: |
46+
ghcr.io/${{ github.repository_owner }}/librechat-admin-panel:${{ github.sha }}
47+
ghcr.io/${{ github.repository_owner }}/librechat-admin-panel:latest
48+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)