Skip to content

Commit c19fa57

Browse files
committed
init
0 parents  commit c19fa57

File tree

15 files changed

+455
-0
lines changed

15 files changed

+455
-0
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: bug
3+
about: 提交缺陷
4+
title: "[subject] what is wrong"
5+
labels: "bug"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
请用简洁并且准确的语句描述缺陷,如果有必要的话,附上屏幕截图。
11+
缺陷对应的软件版本以及相关的环境信息。
12+
请删除样板文字!
13+
-->
14+
15+
在此用几句话简述缺陷
16+
17+
### 重现步骤
18+
19+
1. 重现的步骤 1
20+
2. 重现的步骤 1
21+
3. 重现的步骤 1
22+
23+
上述步骤对应的特定环境
24+
25+
<!--
26+
如果和特定环境无关,是一个一定出现场景,则无需提供对应的环境。
27+
-->
28+
29+
- 浏览器版本
30+
- Android 或 iOS
31+
- 微信版本
32+
- 其他信息
33+
34+
对应的网址:
35+
36+
<!--
37+
如果在线的环境,提供必要的网址。
38+
-->
39+
40+
### 目前表现
41+
42+
小数点错误
43+
44+
### 期望表现
45+
46+
希望展示正确的商品价格

.github/ISSUE_TEMPLATE/chore.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: chore
3+
about: 工程设置
4+
title: "[subject] change repo settings"
5+
labels: "chore"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
工程设置。
11+
请删除样板文字!
12+
-->
13+
14+
工程设置更改
15+
16+
- 添加 release cli
17+
- 添加 changelog

.github/ISSUE_TEMPLATE/epic.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: epic
3+
about: 史诗故事
4+
title: "[subject] need some function"
5+
labels: "epic"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
将史诗故事所包含的内容条目梳理清楚即可,具体的描述应该在 story 中进一步拆解。
11+
请删除样板文字!
12+
-->
13+
14+
产品中需要加入社交功能
15+
16+
- 可以添加好友
17+
- 可以扫一扫
18+
- 可以跟别人打招呼
19+
- 可以踩一踩

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: feature
3+
about: 发布任务
4+
title: "[subject] xxxx"
5+
labels: "feature"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
有时候可以用一个清单来帮助执行者追踪任务的进度。
11+
-->
12+
13+
- [ ] 在此用几句话简述需要完成的事情
14+
15+
### 开发说明
16+
17+
- 开发建议 1
18+
- 开发建议 2
19+
20+
### 相关资料
21+
22+
- [some epic #4](https://github.com/adventurer-tech/roadmap/issues/4)

.github/ISSUE_TEMPLATE/refactor.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: refactor
3+
about: 代码重构
4+
title: "[subject] refactor somthing"
5+
labels: "refactor"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
描述重构哪些地方。
11+
请删除这段样板文字!!!
12+
-->
13+
14+
## 需要重构的地方
15+
16+
- 可以添加好友
17+
- 可以扫一扫
18+
- 可以跟别人打招呼
19+
- 可以踩一踩
20+
21+
## 背景
22+
23+
由于服务的性能较低
24+
25+
## 开发建议
26+
27+
- 建议 1
28+
- 建议 2

.github/ISSUE_TEMPLATE/story.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: story
3+
about: 用户故事
4+
title: "[subject] user can do what"
5+
labels: "story"
6+
assignees: ""
7+
---
8+
9+
<!--
10+
将故事用一句话描述清楚,如有必要配上对应的验收条件。
11+
-->
12+
13+
作为 XXX
14+
我想 XXX
15+
以至于 XXX
16+
17+
### 验收条件
18+
19+
<!--
20+
如果有额外的验收条件,建议在评论中补充,并让执行者知晓这个动态。
21+
-->
22+
23+
- 宽度 800
24+
- 按钮划过有响应
25+
26+
原型或者设计稿的对应截图
27+
28+
<!--
29+
为了方便 CM 更快速定位,可以放上原型或者设计稿的截图。
30+
如果原型和设计稿有变动,在评论中补充,并让执行者知晓这个动态。
31+
-->
32+
33+
### 相关资料
34+
35+
- [some epic #4](https://github.com/adventurer-tech/roadmap/issues/4)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
描述在 PR 中完成的事项。
3+
删除这段标注 !!!!
4+
-->
5+
6+
这个 PR 修复了了商品价格展示。
7+
8+
- 完成 1
9+
- 完成 2
10+
11+
### 发布建议
12+
13+
- 上线时需要设置的环境变量或参数
14+
- 如果需要修改更新线上数据的还需要提供迁移脚本
15+
16+
### 相关资料
17+
18+
- close #4

.github/set-github-repo.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
## Ensure you have gh/yq/jq installed
4+
## mac
5+
## brew install yq
6+
## brew install gh
7+
8+
# 确保 yq 和 gh 已安装
9+
if ! command -v yq &> /dev/null; then
10+
echo "yq could not be found"
11+
exit 1
12+
fi
13+
14+
if ! command -v gh &> /dev/null; then
15+
echo "gh could not be found"
16+
exit 1
17+
fi
18+
19+
# 获取当前脚本的目录
20+
SCRIPT_DIR=$(dirname "$(realpath "$BASH_SOURCE")")
21+
22+
# 定义相对于脚本目录的 secret.yml 文件路径
23+
SECRET_FILE="$SCRIPT_DIR/secret.yml"
24+
25+
# 检查 secret 文件是否存在
26+
if [[ ! -f "$SECRET_FILE" ]]; then
27+
echo "Secret file not found: $SECRET_FILE"
28+
exit 1
29+
fi
30+
31+
# 读取 secret.yml 中的所有顶级键
32+
keys=$(yq e 'keys | .[]' "$SECRET_FILE")
33+
if [[ $? -ne 0 ]]; then
34+
echo "Failed to extract keys from $SECRET_FILE"
35+
exit 1
36+
fi
37+
38+
# 遍历每一个键并设置为 GitHub secret
39+
for key in $keys; do
40+
value=$(yq e ".${key}" "$SECRET_FILE")
41+
if [[ $? -ne 0 ]]; then
42+
echo "Failed to extract value for key $key from $SECRET_FILE"
43+
exit 1
44+
fi
45+
46+
# 调试输出键和值
47+
echo "set key: ${key}"
48+
49+
# 设置 GitHub secret
50+
echo "$value" | gh secret set "$key"
51+
if [[ $? -ne 0 ]]; then
52+
echo "Failed to set GitHub secret for key $key"
53+
exit 1
54+
fi
55+
done
56+
57+
echo "GitHub secrets have been set successfully."

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
types: [opened, reopened, edited, synchronize]
9+
branches:
10+
- 'main'
11+
12+
permissions: write-all
13+
14+
env:
15+
DOCKER_IMAGE: 36node/github-runner
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Docker meta
28+
id: meta
29+
uses: docker/metadata-action@v5
30+
with:
31+
images: |
32+
${{ env.DOCKER_IMAGE }}
33+
# generate Docker tags based on the following events/attributes
34+
tags: |
35+
type=ref,event=branch
36+
type=ref,event=pr
37+
type=semver,pattern={{version}}
38+
type=semver,pattern={{major}}.{{minor}}
39+
type=semver,pattern={{major}}
40+
type=sha
41+
- name: Set up QEMU
42+
uses: docker/setup-qemu-action@v3
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v3
45+
- name: Login to DockerHub
46+
uses: docker/login-action@v3
47+
with:
48+
username: "${{ secrets.DOCKERHUB_USERNAME }}"
49+
password: "${{ secrets.DOCKERHUB_TOKEN }}"
50+
- name: Build and push
51+
uses: docker/build-push-action@v6
52+
with:
53+
context: .
54+
push: true
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}
58+
cache-to: type=inline

.github/workflows/issue-link.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will run tests using node and then publish a package to NPM Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
# 用于验证pr是否包括issue链接
5+
6+
name: Issue link verify
7+
8+
on:
9+
pull_request:
10+
types: [edited, synchronize, opened, reopened]
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
pr-verify:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Verify Linked Issue
22+
uses: hattan/[email protected]
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
message: '请添加issue链接!'

0 commit comments

Comments
 (0)