Compare commits
No commits in common. "master" and "v1.0.0" have entirely different histories.
@ -3,19 +3,20 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
- master
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: git.thehrz.net
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: H8-Network/TinySkin
|
||||
IMAGE_NAME: tinyskin
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
deploy:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -28,7 +29,7 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log into registry
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@ -36,18 +37,12 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.TOKEN }}
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# labels: ${{ steps.meta.outputs.labels }}
|
||||
# cache-from: type=gha
|
||||
# cache-to: type=gha,mode=max
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
@ -11,7 +11,7 @@ COPY frontend .
|
||||
|
||||
RUN pnpm build
|
||||
|
||||
FROM golang:1.23-alpine AS build-stage
|
||||
FROM golang:1.23 AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
version: "3.9"
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
name: traefik
|
||||
external: true
|
||||
|
||||
|
||||
services:
|
||||
tinyskin:
|
||||
build: .
|
||||
container_name: tinyskin
|
||||
volumes:
|
||||
- /srv/server/tinyskin:/app/config
|
||||
restart: always
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.tinyskin.rule=Host(`auth.hfbz.net`)
|
||||
- traefik.http.routers.tinyskin.entrypoints=web,websecure
|
||||
- traefik.http.routers.tinyskin.middlewares=CORS@file
|
||||
- traefik.http.services.tinyskin.loadbalancer.server.port=8080
|
||||
networks:
|
||||
- traefik
|
@ -1,24 +0,0 @@
|
||||
import Button from "@mui/material/Button"
|
||||
import { useCallback } from "react"
|
||||
|
||||
export default function QuickSetter() {
|
||||
const url = "https://auth.hfbz.net/api/yggdrasil"
|
||||
|
||||
const handleDragStart = useCallback(
|
||||
(event: React.DragEvent<HTMLButtonElement>) => {
|
||||
const uri = "authlib-injector:yggdrasil-server:" + encodeURIComponent(url)
|
||||
|
||||
if (event.dataTransfer) {
|
||||
event.dataTransfer.setData("text/plain", uri)
|
||||
event.dataTransfer.dropEffect = "copy"
|
||||
}
|
||||
},
|
||||
[url]
|
||||
)
|
||||
|
||||
return (
|
||||
<Button variant="contained" draggable onDragStart={handleDragStart}>
|
||||
将此按钮拖到启动器
|
||||
</Button>
|
||||
)
|
||||
}
|
@ -166,7 +166,7 @@ export default function SignUp() {
|
||||
checkList={[
|
||||
{
|
||||
errMsg: "长度在 3-16 之间,由数字、大小写字母、_构成",
|
||||
reg: /^[0-9a-zA-Z_]{3,16}$/
|
||||
reg: /[0-9a-zA-Z_]{3,16}/
|
||||
}
|
||||
]}
|
||||
required
|
||||
|
@ -11,7 +11,6 @@ import Box from '@mui/material/Box';
|
||||
import useTitle from '@/hooks/useTitle';
|
||||
import SkinViewUUID from '@/components/SkinViewUUID';
|
||||
import root from '@/utils/root';
|
||||
import YggdrasilSetter from '@/components/YggdrasilSetter';
|
||||
|
||||
const Profile = function Profile() {
|
||||
const navigate = useNavigate();
|
||||
@ -55,7 +54,14 @@ const Profile = function Profile() {
|
||||
<Typography>本站 Yggdrasil 认证服务器地址</Typography>
|
||||
<code style={{ wordBreak: "break-all" }}>{getYggRoot()}</code>
|
||||
<Typography>点击下方按钮复制 API 地址,或者将按钮拖动至启动器的任意界面即可快速添加认证服务器。</Typography>
|
||||
<YggdrasilSetter />
|
||||
<Button
|
||||
variant="contained"
|
||||
href="https://auth.hfbz.net/api/yggdrasil"
|
||||
draggable='true'
|
||||
data-clipboard-text="https://auth.hfbz.net/api/yggdrasil"
|
||||
>
|
||||
将此按钮拖到启动器
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Box sx={{ gridArea: "d" }}></Box>
|
||||
|
Loading…
x
Reference in New Issue
Block a user