diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 60485e4..e272a0f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,53 +1,53 @@ -#name: Docker -# -#on: -# push: -# # Publish `master` as Docker `latest` image. -# branches: -# - master -# -# # Publish `v1.2.3` tags as releases. -# tags: -# - v* -# -# # Run tests for any PRs. -# pull_request: -# -#jobs: -# # Run tests. -# # See also https://docs.docker.com/docker-hub/builds/automated-testing/ -# test: -# runs-on: ubuntu-latest -# -# 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="master" -# 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=$REPO_URL \ -# --build-arg branch_name=$BRANCH_NAME \ -# . --file Dockerfile -# fi +name: Docker + +on: + push: + # Publish `master` as Docker `latest` image. + branches: + - master + + # Publish `v1.2.3` tags as releases. + tags: + - v* + + # Run tests for any PRs. + pull_request: + +jobs: + # Run tests. + # See also https://docs.docker.com/docker-hub/builds/automated-testing/ + test: + runs-on: ubuntu-latest + + 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="master" + 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=$REPO_URL \ + --build-arg branch_name=$BRANCH_NAME \ + . --file Dockerfile + fi # # # # Push image to GitHub Packages. diff --git a/.github/workflows/pyinstaller-publish.yml b/.github/workflows/pyinstaller-publish.yml index 5a69524..e98e831 100644 --- a/.github/workflows/pyinstaller-publish.yml +++ b/.github/workflows/pyinstaller-publish.yml @@ -49,7 +49,8 @@ jobs: echo "Moving $SOURCE_PATH to $DESTINATION_PATH" # 使用PowerShell的Move-Item命令进行移动和重命名 - Move-Item -Path $SOURCE_PATH -Destination $DESTINATION_PATH + #Move-Item -Path $SOURCE_PATH -Destination $DESTINATION_PATH + cp -r dist/bbup/* tauri-app/src-tauri/binaries shell: pwsh # Optionally verify that it works (provided that it does not need user interaction) #- run: ./dist/your-code/your-code diff --git a/.gitignore b/.gitignore index 0895e52..22c0712 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,5 @@ data/ .next out downloads/ -target \ No newline at end of file +target +_internal \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index aa607d8..0f371c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5289,7 +5289,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stream-gears" -version = "1.0.0" +version = "1.0.1" dependencies = [ "anyhow", "biliup", diff --git a/README.md b/README.md index e477260..ee8a40c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ ## 📜 使用文档 -- [使用文档 »](https://docs.biliup.me) +- [使用文档 »](https://docs.biliup.rs) ## 🚀 快速开始 diff --git a/app/ui/TemplateModal.tsx b/app/ui/TemplateModal.tsx index 657dd73..52c7cb6 100644 --- a/app/ui/TemplateModal.tsx +++ b/app/ui/TemplateModal.tsx @@ -1,6 +1,7 @@ import { Form, Modal, + Input, Notification, Typography, Collapse, @@ -30,9 +31,9 @@ const TemplateModal: React.FC = ({ children, entity, onOk }) const maskStyle = isOpen ? {} : { - WebkitMaskImage: - 'linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.2) 80%, transparent 100%)', - } + WebkitMaskImage: + 'linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.2) 80%, transparent 100%)', + } const collapsed = (
@@ -44,8 +45,17 @@ const TemplateModal: React.FC = ({ children, entity, onOk }) mv = backup/ 移动文件到backup目录下
run = echo hello! 使用当前运行用户在 shell 执行任意命令, +
+ webhook = url + 不填写则是默认的逻辑,上传失败后重试直至达到最大重试次数 +
+ 填写后,是否上传成功的判断由WebHook给出,但失败最大重试次数仍会被限制(前往空间配置-上传重试次数限制处配置) +
+ 上传任务完成后,会将主播信息、稿件信息、捕获的异常等以post模式发送给WebHook,当WebHook返回success字符串时视为上传成功,执行正常后处理流程,否则返回其他任意内容或请求失败均尝试重新上传 +
注意风险。视频文件路径作为标准输入传入 - {/* TODO: 在这里塞插件仓库 */} +
+ TODO: 在这里塞插件仓库
) const toggle = () => { @@ -176,6 +186,7 @@ const TemplateModal: React.FC = ({ children, entity, onOk }) run(运行) mv(移动到) rm(删除文件) + webhook {api.current?.getValue(field)?.cmd !== 'rm' ? ( = ({ children, entity, onOk }) labelPosition="inset" rules={[{ required: true, message }]} style={{ width: 300, marginRight: 16 }} + placeholder={ api.current?.getValue(field)?.cmd === 'webhook' ? 'https://example.com/notify' : undefined } > ) : null}