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:
23
.github/workflows/codecov.yml
vendored
Normal file
23
.github/workflows/codecov.yml
vendored
Normal 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
28
.github/workflows/issue-auto-reply.yml
vendored
Normal 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!
|
||||
25
.github/workflows/issue-close-question.yml
vendored
Normal file
25
.github/workflows/issue-close-question.yml
vendored
Normal 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
22
.github/workflows/lint.yml
vendored
Normal 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
18
.github/workflows/test.yml
vendored
Normal 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
27
.github/workflows/welcome.yml
vendored
Normal 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 仓库给予我们支持!
|
||||
Reference in New Issue
Block a user