2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 12:40:25 +08:00

feat: github workflows

This commit is contained in:
耗子
2023-06-22 17:49:15 +08:00
parent d2afa89d21
commit 2e7d0b9b47
9 changed files with 349 additions and 0 deletions

137
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,137 @@
name: 🐛 报告问题 (Bug Report)
description: 创建一个报告以帮助我们改进 (Create a report to help us improve)
title: "🐛 [Bug] "
labels: [ "☢️ Bug", "bug" ]
body:
- type: markdown
attributes:
value: |
**请仅使用 简体中文 或 英文 进行填写**
**Please only use Simplified Chinese or English to fill in**
- type: checkboxes
id: checks
attributes:
label: 在提问之前 (Before Asking)
description: |
提问之前,先回答几个小问题。
Before asking questions, answer a few quick questions.
options:
- label: 我已经搜索了现有的 Issues, Discussions 和 Google (I've searched the existing Issues, Discussions and Google)
required: true
- label: 我已经阅读了 README 中除版本记录以外的所有内容 (I've read everything in the README except the version notes)
required: true
- label: 我在提问题之前至少花费了 5 分钟来思考和准备 (I spend at least 5 minutes thinking and preparing before asking a question)
required: true
- label: 我没有改动过面板及系统的任何文件 (I have not changed any files of the panel and system)
required: false
- label: 这个问题可以被稳定复现 (The problem can be stably reproduced)
required: false
- label: 问题是在升级之后产生的 (The problem is generated after upgrading)
required: false
- type: dropdown
id: system
attributes:
label: 操作系统 (Operating System)
options:
- RockyLinux
- AlmaLinux
- Debian
- Other
validations:
required: true
- type: input
id: system-version
attributes:
label: 操作系统版本 (Operating System Version)
description: |
请提供操作系统的版本号。
Please provide the version number of the operating system.
placeholder: "9.0"
validations:
required: true
- type: input
id: version
attributes:
label: 耗子面板版本 (HaoZi Panel Version)
placeholder: "2.0.0"
validations:
required: true
- type: textarea
id: describe
attributes:
label: 描述问题 (Describe The Problem)
description: |
简明概要地描述你遇到的问题。
Briefly describe the problem you are having.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: 如何复现 (How To Reproduce)
description: |
重现该问题的详细步骤。
Detailed steps to reproduce the problem.
value: |
1. 安装面板
2. 设置 '...'
3. 点击 '...'
4. 出现问题
validations:
required: false
- type: textarea
id: expected
attributes:
label: 预期行为 (Expected Behavior)
description: |
简明概要地描述你期望发生的事情。
Briefly describe what you expect to happen.
validations:
required: true
- type: textarea
id: logs
attributes:
label: 相关日志 (Related Logs)
description: |
请复制并粘贴任何相关的日志输出。
Please copy and paste any relevant log output.
可以把文件拖入这个区域以添加日志文件。
Files can be dragged into this area to add log files.
面板日志文件可在 `/www/panel/storage/logs` 中找到。
Panel log files can be found in `/www/panel/storage/logs`.
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: 截图 (Screenshots)
description: |
如果有,添加屏幕截图可帮助更快定位你的问题。
If so, adding screenshots can help locate your issue faster.
可以复制图片后在此区域内粘贴以添加图片。
Pictures can be copied and pasted in this area to add pictures.
如有必要,使用马赛克遮盖敏感信息。
Use a mosaic to obscure sensitive information if necessary.
validations:
required: false
- type: textarea
id: others
attributes:
label: 还有别的吗 (Anything Else)
description: |
运行环境?浏览器?软件版本?相关的配置?链接?参考资料?
Environment? Browser? Software version? Related configuration? Link? References?
任何能让我们对你所遇到的问题有更多了解的东西。
Anything that can give us more insight into the problem you're having.
validations:
required: false
- type: textarea
id: yellows
attributes:
label: 来点色图 (Porn Pictures)
description: |
如果你不提供色图而你的 Issue 中又有其他不符合标准的地方,那么你的 Issue 可能会被直接关闭。
If you don't provide some porn pictures and there are other non-conformities in your issue, then your issue may be closed directly.
validations:
required: false

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: ❓ 讨论、问答和非项目问题 (Discussions, questions, and non-project issues)
url: https://jq.qq.com/?_wv=1027&k=I1oJKSTH
about: 其他不明之处请移步我们的QQ群 12370907 (For other unclear things, please move to our qq group 12370907)

View File

@@ -0,0 +1,64 @@
name: ✨ 功能请求 (Feature Request)
description: 为这个项目提出一个想法 (Suggest an idea for this project)
title: "✨ [Feature] "
labels: [ "✏️ Feature", "enhancement" ]
body:
- type: markdown
attributes:
value: |
**请仅使用 简体中文 或 英文 进行填写**
**Please only use Simplified Chinese or English to fill in**
- type: checkboxes
attributes:
label: 在提问之前 (Before Asking)
description: |
提问之前,先回答几个小问题。
Before asking questions, answer a few quick questions.
options:
- label: 我已经搜索了全部 Issues 和 Commits (I have searched all Issues and Commits)
required: true
- label: 它们当中没有我将要提交的新功能 (None of them have new feature that I'm going to submit)
required: true
- type: textarea
id: feature
attributes:
label: 描述功能 (Describe Feature)
description: |
简明概要地描述你的新功能,以及它将解决什么问题。
Briefly describe your new feature and what problem it will solve.
validations:
required: true
- type: textarea
id: workflow
attributes:
label: 工作流程 (WorkFlow)
description: |
请向我们提供有关该功能的实现流程。
Please provide us with the implementation flow for this feature.
value: |
1. 新建文件 ....
2. 添加函数 ....
3. ...
validations:
required: true
- type: textarea
id: others
attributes:
label: 还有别的吗 (Anything Else)
description: |
运行环境?浏览器?软件版本?相关的配置?链接?参考资料?
Environment? Browser? Software version? Related configuration? Link? References?
任何能让我们对该功能的实现有更多帮助的东西。
Anything that can help us more with the implementation of this feature.
validations:
required: false
- type: textarea
id: yellows
attributes:
label: 来点色图 (Porn Pictures)
description: |
如果你不提供色图而你的 Issue 中又有其他不符合标准的地方,那么你的 Issue 可能会被直接关闭。
If you don't provide some porn pictures and there are other non-conformities in your issue, then your issue may be closed directly.
validations:
required: false

23
.github/workflows/codecov.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Codecov
on:
push:
branches:
- master
pull_request:
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Install dependencies
run: go mod tidy
- name: Run tests with coverage
run: go test -v -coverprofile="coverage.out" ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.out
token: ${{ secrets.CODECOV }}

28
.github/workflows/issue-auto-reply.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Issue Auto Reply
on:
issues:
types: [ labeled ]
permissions:
contents: read
jobs:
issue-reply:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: bug or enhancement
if: github.event.label.name == '✏️ Feature'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hi @${{ github.event.issue.user.login }} 👋
我们认为您的反馈非常有价值!如果有兴趣欢迎前往 极狐GitLab 仓库提交 PR请包含相应的测试用例、文档等并确保 CI 通过,感谢和期待您的贡献!
We think your feedback is very valuable! If you are interested, please submit a PR to JiHu GitLab repository, please include test cases, documentation, etc., and ensure that the CI is passed, thank you and look forward to your contribution!

View File

@@ -0,0 +1,25 @@
name: Issue Close Question
on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
issue-close-require:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: needs more info
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: 'question'
inactive-day: 3
body: |
由于该 Issue 3天未收到回应现已被自动关闭若有任何问题可评论回复。
This issue has been closed automatically because it has not had recent activity for 3 days. If you have any questions, please comment here.

22
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Lint
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=30m ./...

18
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...

27
.github/workflows/welcome.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Welcome
on:
pull_request:
types: [ opened, closed ]
issues:
types: [ opened ]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/welcome@v1
with:
FIRST_ISSUE: |
Hi @{{ author }} 👋
Thanks for opening this issue to HaoZi Panel, we will respond as soon as possible! 💖
感谢您向 耗子面板 提出此 Issue我们将尽快反馈 💖
FIRST_PR: |
Hi @{{ author }} 👋
Thanks for opening this PR to HaoZi Panel, But we use JiHu GitLab to develop, please submit PR to our JiHu GitLab repository, thank you! 💖
感谢您向 耗子面板 提交此 PR但是我们使用 极狐GitLab 进行开发,请提交 PR 到我们的 极狐GitLab 仓库,谢谢! 💖
STAR_MESSAGE: |
If you like this project, please ⭐star⭐ our repository to support us!
如果您喜欢这个项目,请 Star 仓库给予我们支持!