This commit is contained in:
parent
8b0c1284a6
commit
83bf7db089
56
.gitea/workflows/build.yaml
Normal file
56
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# paths:
|
||||||
|
# - manifest.yaml
|
||||||
|
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- 'manifests/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- id: commit
|
||||||
|
uses: prompt/actions-commit-hash@v3
|
||||||
|
- name: Setup NodeJS
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
- name: 'Login to Container Registry'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: leafdev.top
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: 'Build Inventory Image'
|
||||||
|
run: |
|
||||||
|
docker build . -f Dockerfile --tag leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }}
|
||||||
|
docker push leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }}
|
||||||
|
docker tag leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }} leafdev.top/leaf/amber-ui:latest
|
||||||
|
- name: 'Patch Manifest'
|
||||||
|
uses: fjogeleit/yaml-update-action@main
|
||||||
|
with:
|
||||||
|
valueFile: 'manifests/deployment.yaml'
|
||||||
|
propertyPath: 'spec.template.spec.containers[0].image'
|
||||||
|
value: 'leafdev.top/leaf/amber-ui:${{ steps.commit.outputs.short }}'
|
||||||
|
commitChange: false
|
||||||
|
- name: Push
|
||||||
|
run: |
|
||||||
|
git config user.name ${{ gitea.actor }}
|
||||||
|
git config user.email ${{ gitea.actor }}@users.noreply.leafdev.top
|
||||||
|
git add manifests/deployment.yaml
|
||||||
|
git commit -m "Update manifests"
|
||||||
|
# git push https://${{ secrets.GITEA_TOKEN }}@leafdev.top/${{ gitea.repository }}.git
|
||||||
|
git push
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||||
<title>amber-wails</title>
|
<title>Amberlet 琥珀</title>
|
||||||
<style>
|
<style>
|
||||||
/* 检测当前主题 */
|
/* 检测当前主题 */
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
|
24
manifests/deployment.yaml
Normal file
24
manifests/deployment.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: amber-ui
|
||||||
|
namespace: amber
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: amber-ui
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: amber-ui
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: leaf
|
||||||
|
containers:
|
||||||
|
- name: amber
|
||||||
|
image: leafdev.top/leaf/amber-ui:d034653
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http-80
|
31
manifests/manifest.yaml
Normal file
31
manifests/manifest.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: amber-ui
|
||||||
|
namespace: amber
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: amber.leaflow.cn
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: amber-ui
|
||||||
|
port:
|
||||||
|
name: http-80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: amber-ui
|
||||||
|
namespace: amber
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: amber-ui
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http-80
|
||||||
|
type: ClusterIP
|
3
src/components.d.ts
vendored
3
src/components.d.ts
vendored
@ -9,9 +9,8 @@ declare module 'vue' {
|
|||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AssistantMenu: typeof import('./components/AssistantMenu.vue')['default']
|
AssistantMenu: typeof import('./components/AssistantMenu.vue')['default']
|
||||||
Assistants: typeof import('./components/assistants/index.vue')['default']
|
Assistants: typeof import('./components/assistants/index.vue')['default']
|
||||||
Chat: typeof import('./components/chat/Chat.vue')['default']
|
Chat: typeof import('./components/chat/chat.vue')['default']
|
||||||
ChatMenu: typeof import('./components/ChatMenu.vue')['default']
|
ChatMenu: typeof import('./components/ChatMenu.vue')['default']
|
||||||
Container: typeof import('./components/Container.vue')['default']
|
|
||||||
LeftSettings: typeof import('./components/LeftSettings.vue')['default']
|
LeftSettings: typeof import('./components/LeftSettings.vue')['default']
|
||||||
Menu: typeof import('./components/Menu.vue')['default']
|
Menu: typeof import('./components/Menu.vue')['default']
|
||||||
MessageList: typeof import('./components/chat/MessageList.vue')['default']
|
MessageList: typeof import('./components/chat/MessageList.vue')['default']
|
||||||
|
Loading…
Reference in New Issue
Block a user