flx(build): 修复#1025 npm会编译失败的问题 (#1031)

* flx(build): #1025

* 优化

* flx(build): 修复构建时只会从主库中获取文件  (#1034)

* Update page.tsx

---------

Co-authored-by: ForgQi <34411314+ForgQi@users.noreply.github.com>
This commit is contained in:
KataickandForgQi authored and GitHub committed 2024-08-12 14:34:14 +00:00
1 parent 79e57a1ef7
commit 37bbcfad3d
4 files changed
+41 -16

No files matched your search

+25 -2
View File
@@ -22,15 +22,34 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Get PR number, repo URL, and branch name
run: |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
pr_number=$(jq -r .number < "$GITHUB_EVENT_PATH")
repo_url=$(jq -r .pull_request.head.repo.clone_url < "$GITHUB_EVENT_PATH")
branch_name=$GITHUB_HEAD_REF
else
pr_number=""
repo_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY
branch_name=$(git rev-parse --abbrev-ref HEAD)
fi
echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV
echo "REPO_URL=$repo_url" >> $GITHUB_ENV
echo "BRANCH_NAME=$branch_name" >> $GITHUB_ENV
- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build --build-arg repo_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY . --file Dockerfile
docker build \
--build-arg repo_url=$REPO_URL \
--build-arg branch_name=$BRANCH_NAME \
. --file Dockerfile
fi
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
@@ -43,6 +62,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
@@ -52,14 +72,17 @@ jobs:
ghcr.io/biliup/caution
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
@@ -67,4 +90,4 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
+6 -5
View File
@@ -1,16 +1,17 @@
# Build biliup's web-ui
FROM node:lts as webui
ARG repo_url=https://github.com/ForgQi/biliup
ARG repo_url=https://github.com/biliup/biliup
ARG branch_name=master
RUN set -eux; \
git clone --depth 1 $repo_url; \
git clone --depth 1 --branch "$branch_name" "$repo_url"; \
cd biliup; \
npm install; \
npm run build
# Deploy Biliup
FROM python:3.12-slim as biliup
ARG repo_url=https://github.com/ForgQi/biliup
ARG repo_url=https://github.com/biliup/biliup
ARG branch_name=master
ENV TZ=Asia/Shanghai
EXPOSE 19159/tcp
VOLUME /opt
@@ -72,7 +73,7 @@ RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y --no-install-recommends git g++; \
git clone --depth 1 $repo_url && \
git clone --depth 1 --branch "$branch_name" "$repo_url"; \
cd biliup && \
pip3 install --no-cache-dir quickjs && \
pip3 install -e . && \
+6 -5
View File
@@ -10,16 +10,17 @@ import {
import TemplateModal from "../ui/TemplateModal";
import { Table, Avatar } from '@douyinfe/semi-ui';
import { IconMore } from '@douyinfe/semi-icons';
import {ColumnProps} from "@douyinfe/semi-ui/lib/es/table/interface";
import { ColumnProps } from "@douyinfe/semi-ui/lib/es/table/interface";
import { SortOrder } from "@douyinfe/semi-ui/lib/es/table";
import useSWR from "swr";
import {fetcher, FileList, StudioEntity} from "@/app/lib/api-streamer";
import {useState} from "react";
import { fetcher, FileList, StudioEntity } from "@/app/lib/api-streamer";
import { useState } from "react";
import Player from 'xgplayer';
import 'xgplayer/dist/index.min.css';
import FlvPlugin from "xgplayer-flv";
import FlvJsPlugin from 'xgplayer-flv.js'
import Players from "@/app/ui/Player";
import {humDate} from "@/app/lib/utils";
import { humDate } from "@/app/lib/utils";
export default function Home() {
const { Header, Footer, Sider, Content } = Layout;
@@ -45,7 +46,7 @@ export default function Home() {
{
title: '更新日期',
dataIndex: 'updateTime',
defaultSortOrder: 'descend',
defaultSortOrder: 'descend' as SortOrder,
sorter: (a: any, b: any) => (a.updateTime - b.updateTime > 0 ? 1 : -1),
render: (time: number) => humDate(time),
},
+4 -4
View File
@@ -3,13 +3,13 @@
import { AutoComplete, Layout, Nav, Spin, Table, Typography } from "@douyinfe/semi-ui";
import { SortOrder } from "@douyinfe/semi-ui/lib/es/table";
import useSWR from "swr";
import {fetcher, FileList} from "@/app/lib/api-streamer";
import { fetcher, FileList } from "@/app/lib/api-streamer";
import {
JSXElementConstructor, Key, ReactElement, ReactNode, ReactPortal, useRef,
useState
} from "react";
import {IconCustomerSupport, IconSearch, IconVideoListStroked} from "@douyinfe/semi-icons";
import {humDate} from "@/app/lib/utils";
import { IconCustomerSupport, IconSearch, IconVideoListStroked } from "@douyinfe/semi-icons";
import { humDate } from "@/app/lib/utils";
import Filter from "@/app/job/Filter";
export default function Home() {
@@ -48,7 +48,7 @@ export default function Home() {
{
title: '更新日期',
dataIndex: 'date',
defaultSortOrder: 'descend',
defaultSortOrder: 'descend' as SortOrder,
sorter: (a: any, b: any) => ( a.date - b.date > 0 ? 1 : -1),
render: (time: number) => humDate(time),
},