Skip to content

Commit e6a19dd

Browse files
committed
feat(workflow): add UI release workflow for Docker image
1 parent 0bb00f7 commit e6a19dd

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/ui-release.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: UI Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "ui/v*"
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.repository_owner }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Extract metadata (tags, labels) for Docker
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
images: ghcr.io/memodb-io/acontext-ui
31+
tags: |
32+
type=sha
33+
type=semver,pattern={{version}},match=v(\d.\d.\d)$
34+
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@v3
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Build and Push Docker image
42+
uses: docker/build-push-action@v6
43+
with:
44+
platforms: linux/amd64,linux/arm64
45+
context: ./src/server/ui
46+
push: true
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
cache-from: type=gha
50+
cache-to: type=gha
51+

0 commit comments

Comments
 (0)