Skip to content

Commit

Permalink
Merge pull request #417 from PBH-BTN/master
Browse files Browse the repository at this point in the history
v6.1.0
  • Loading branch information
Ghost-chu authored Sep 7, 2024
2 parents ee7c8fa + c169a4b commit d90406b
Show file tree
Hide file tree
Showing 105 changed files with 2,650 additions and 1,806 deletions.
62 changes: 35 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ body:
value: |-
## 请注意 - Caution
This form only used for bug report, for any other cases, please [click here](https://github.com/PBH-BTN/PeerBanHelper/issues/new)
此表单**仅用于反馈错误**,如果是其它类型的反馈,请[点击这里](https://github.com/PBH-BTN/PeerBanHelper/issues/new)。
If you think the error is related PBH WebUI, please [report to here](https://github.com/PBH-BTN/pbh-fe)
如果你认为此错误是一个 PBH WebUI,请[在此反馈](https://github.com/PBH-BTN/pbh-fe)。
此表单**仅用于反馈错误**,如果是其它类型的反馈,请[点击这里](https://github.com/PBH-BTN/PeerBanHelper/issues/new)。
请尽可能完整且详细地填写所有表单项,以便我们以最高效率并准确的排查故障和诊断问题
- type: 'textarea'
attributes:
Expand All @@ -34,29 +32,40 @@ body:
placeholder: '操作系统平台名称……'
validations:
required: true
- type: 'textarea'
- type: checkboxes
id: deploy-methods
attributes:
label: '部署方式 - Deploy method'
label: '部署方式 - Deploy methods'
description: |-
Enter the deploy method that you're using:
输入您部署 PeerBanHelper 方式,官方支持的有如下几种方式:
* Windows 安装程序(通过 .exe 安装) (Windows .EXE Installer)
* Windows 绿色懒人包(解压即用的 .zip 文件) (Windows .ZIP Portable)
* Docker 镜像 (Docker Container)
placeholder: '部署方式……'
Check and tick checkboxes that deploy methods that you're using
请检查并勾选你正在使用的 PeerBanHelper 部署方式
options:
- label: "Windows .exe 安装程序 (Windows .exe Installer)"
required: false
- label: "Windows .zip 绿色部署包 (Windows .zip Portable)"
required: false
- label: "Docker"
required: false
- label: "JAR 包直接启动 (Start via .JAR directly)"
required: false
validations:
required: true
- type: 'textarea'
- type: checkboxes
id: downloaders
attributes:
label: '关联的下载器类型 - Downloader Type'
label: '添加的下载器 - Added Downloaders'
description: |-
Enter the downloader type that you trying to connecting/connected to PBH (E.g):
输入您的 PBH 关联的下载器类型,例如:
* qBittorrent
* Transmission
* Deluge
* ... 等
placeholder: '我添加的下载器有……'
Check and tick checkboxes if you added those downloader(s) into your PeerBanHelper installation
请勾选被你添加到 PeerBanHelper 中的下载器类型
options:
- label: "qBittorrent"
required: false
- label: "BiglyBT/Azureus/Vuze"
required: false
- label: "Deluge"
required: false
- label: "Transmission"
required: false
validations:
required: true
- type: 'textarea'
Expand Down Expand Up @@ -101,16 +110,15 @@ body:
label: 检查清单 - Check list
description: |-
Check and tick checkboxes that listed below
检查并勾选所有需要勾选的框框
options:
- label: "我确定正在运行 Github Releases 中的最新的正式版本 PeerBanHelper (I'm running the latest version of PBH that can be found in Github Relases)"
required: false
- label: "我确定我所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))"
- label: "PeerBanHelper 已更新到最新版本 (I'm running the latest version of PBH that can be found in Github Relases)"
required: false
- label: "我确定我所提到的问题,均未在 README 和 WIKI 中有所解答 (This not a question/or the question that not listed in README's FAQ or WIKI)"
- label: "所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))"
required: false
- label: "我确定我没有检查这个检查清单,只是闭眼选中了所有的复选框 (I have not read these checkboxes and therefore I just ticked them all)"
- label: "我已检查过 [PBH 文档](https://pbh-btn.github.io/pbh-docs/)(特别是常见问题),且即使使用了搜索也没有找到与此有关的内容 (This not a question/or the question that not listed in README's FAQ or [PBH WIKI](https://pbh-btn.github.io/pbh-docs/))"
required: false
- label: "我确定这不是一个与安全有关的安全漏洞,它可以被安全的公开报告 (This not a security related issue, can be safe report in public)"
- label: "我没有检查这个检查清单,只是闭眼选中了所有的复选框,请关闭这个 Issue (I have not read these checkboxes and therefore I just ticked them all, Please close this issue)"
required: false
- label: "我确定我已知悉,如果我没有正确地填写问题报告表单,则 Issue 可能会被关闭 (I know this issue may closed without any warnings if I didn't fill the form correctly)"
- label: "这不是一个安全漏洞,它可以被安全的公开报告。若需要报告安全漏洞,请[在此报告](https://github.com/PBH-BTN/PeerBanHelper/security/advisories/new) (This not a security related issue, can be safe report in public. If you want report a security exploit, please report it [here](https://github.com/PBH-BTN/PeerBanHelper/security/advisories/new))"
required: false
4 changes: 3 additions & 1 deletion .github/workflows/jvm-ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Java CI

on:
pull_request:
branches: [ "master", "release", "v6", "api-std" ]
branches: [ "master", "release" ]
workflow_dispatch:
jobs:
WebUI:
Expand Down Expand Up @@ -66,3 +66,5 @@ jobs:
linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max
3 changes: 2 additions & 1 deletion .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ name: Java CI

on:
push:
branches: [ "master", "release", "v6", "api-std" ]
workflow_dispatch:
jobs:
WebUI:
Expand Down Expand Up @@ -82,3 +81,5 @@ jobs:
linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max
6 changes: 6 additions & 0 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GIT_HASH=${{ github.sha }}
# ---------------- ALIYUN ACR --------------------
- name: Log in to Aliyun ACR
uses: docker/login-action@v3
Expand Down Expand Up @@ -133,3 +137,5 @@ jobs:
linux/arm64/v8
tags: ${{ steps.meta-acr.outputs.tags }}
labels: ${{ steps.meta-acr.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max
9 changes: 4 additions & 5 deletions .github/workflows/webui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ on:
push:
branches: ["master"]
paths:
- 'webui/**'
- "webui/**"
pull_request:
branches: ["master"]
paths:
- 'webui/**'

- "webui/**"

defaults:
run:
working-directory: 'webui'
working-directory: "webui"

jobs:
Build:
uses: ./.github/workflows/build_fe.yml
Lint:
needs: Build
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
31 changes: 21 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
FROM --platform=$BUILDPLATFORM docker.io/maven:3.9.9-eclipse-temurin-21-alpine AS build
# 构建前端
FROM --platform=$BUILDPLATFORM docker.io/node:alpine AS frontend-build
COPY ./webui /build/webui
WORKDIR /build/webui
RUN corepack enable pnpm && \
pnpm i && \
pnpm run build

# 下载依赖
FROM maven:3-eclipse-temurin-21-alpine as backend-build
COPY pom.xml /build/pom.xml
WORKDIR /build
# fetch all dependencies
RUN mvn dependency:go-offline -B -T 1.5C -Daether.dependencyCollector.impl=bf -Dmaven.artifact.threads=32

# 构建后端
COPY . /build
WORKDIR /build
RUN apk add --update npm curl && \
curl -L https://unpkg.com/@pnpm/self-installer | node && \
cd webui && \
pnpm i && \
npm run build && \
cd .. && \
mv webui/dist src/main/resources/static && \
mvn -B clean package --file pom.xml -T 1.5C
# 把前端打包好的文件拉来
COPY --from=frontend-build /build/webui/dist src/main/resources/static
RUN apk add --update curl git && \
mvn -B clean package --file pom.xml -T 1.5C -Daether.dependencyCollector.impl=bf -Dmaven.artifact.threads=32

# 最终阶段,只要成品
FROM docker.io/azul/zulu-openjdk-alpine:21.0.4-21.36-jre
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper"
USER 0
ENV TZ=UTC
WORKDIR /app
VOLUME /tmp
COPY --from=build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar
COPY --from=backend-build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar
ENV PATH="${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
Loading

0 comments on commit d90406b

Please sign in to comment.