Compare commits

..

11 Commits

Author SHA1 Message Date
960551ad9b pref: update runner label
All checks were successful
CI / release-image (push) Successful in 2m34s
2025-04-13 11:01:55 +08:00
cfd36220b5 pref: update runner label
Some checks failed
CI / release-image (push) Failing after 1m12s
2025-04-13 10:53:26 +08:00
ddb09068e3
fix: update username check
Some checks failed
CI / release-image (push) Failing after 22m9s
2025-04-13 01:54:40 +08:00
4ef4ea4668
pref: update YggdrasilSetter button
All checks were successful
CI / release-image (push) Successful in 2m20s
2025-04-13 01:41:51 +08:00
9f4abccfeb
pref: updare ci.yml
All checks were successful
CI / release-image (push) Successful in 2m41s
2025-04-13 01:31:07 +08:00
80a9c3e5d8
fix: update YggdrasilSetter
All checks were successful
CI / release-image (push) Successful in 2m22s
2025-04-13 01:23:00 +08:00
0d6117c374
pref: updare ci.yml
All checks were successful
CI / release-image (push) Successful in 2m42s
2025-04-13 00:34:01 +08:00
5b10e2fc38
pref: updare ci.yml
Some checks failed
CI / release-image (push) Failing after 3m12s
2025-04-13 00:24:34 +08:00
be4d661fa6
pref: updare ci.yml
Some checks failed
CI / deploy (push) Failing after 3m21s
2025-04-12 23:45:55 +08:00
05a1707eb6
pref: updare ci.yml
Some checks failed
CI / deploy (push) Failing after 2m39s
2025-04-12 23:39:07 +08:00
ef36c82b75
pref: updare ci.yml
Some checks failed
CI / deploy (push) Failing after 15s
2025-04-12 23:34:04 +08:00
6 changed files with 44 additions and 44 deletions

View File

@ -3,20 +3,19 @@ name: CI
on: on:
push: push:
branches: branches:
- master - 'master'
tags:
- 'v*'
pull_request:
branches:
- master
env: env:
# Use docker.io for Docker Hub if empty # Use docker.io for Docker Hub if empty
REGISTRY: git.thehrz.net REGISTRY: git.thehrz.net
# github.repository as <account>/<repo> # github.repository as <account>/<repo>
IMAGE_NAME: tinyskin IMAGE_NAME: H8-Network/TinySkin
jobs: jobs:
deploy: release-image:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -29,7 +28,7 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }} - name: Log into registry
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -37,12 +36,18 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.TOKEN }} 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 - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} # labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha # cache-from: type=gha
cache-to: type=gha,mode=max # cache-to: type=gha,mode=max

View File

@ -11,7 +11,7 @@ COPY frontend .
RUN pnpm build RUN pnpm build
FROM golang:1.23 AS build-stage FROM golang:1.23-alpine AS build-stage
WORKDIR /app WORKDIR /app
ENV GOPROXY https://goproxy.cn,direct ENV GOPROXY https://goproxy.cn,direct

View File

@ -1,23 +0,0 @@
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

View File

@ -0,0 +1,24 @@
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>
)
}

View File

@ -166,7 +166,7 @@ export default function SignUp() {
checkList={[ checkList={[
{ {
errMsg: "长度在 3-16 之间由数字、大小写字母、_构成", errMsg: "长度在 3-16 之间由数字、大小写字母、_构成",
reg: /[0-9a-zA-Z_]{3,16}/ reg: /^[0-9a-zA-Z_]{3,16}$/
} }
]} ]}
required required

View File

@ -11,6 +11,7 @@ import Box from '@mui/material/Box';
import useTitle from '@/hooks/useTitle'; import useTitle from '@/hooks/useTitle';
import SkinViewUUID from '@/components/SkinViewUUID'; import SkinViewUUID from '@/components/SkinViewUUID';
import root from '@/utils/root'; import root from '@/utils/root';
import YggdrasilSetter from '@/components/YggdrasilSetter';
const Profile = function Profile() { const Profile = function Profile() {
const navigate = useNavigate(); const navigate = useNavigate();
@ -54,14 +55,7 @@ const Profile = function Profile() {
<Typography> Yggdrasil </Typography> <Typography> Yggdrasil </Typography>
<code style={{ wordBreak: "break-all" }}>{getYggRoot()}</code> <code style={{ wordBreak: "break-all" }}>{getYggRoot()}</code>
<Typography> API </Typography> <Typography> API </Typography>
<Button <YggdrasilSetter />
variant="contained"
href="https://auth.hfbz.net/api/yggdrasil"
draggable='true'
data-clipboard-text="https://auth.hfbz.net/api/yggdrasil"
>
</Button>
</CardContent> </CardContent>
</Card> </Card>
<Box sx={{ gridArea: "d" }}></Box> <Box sx={{ gridArea: "d" }}></Box>