-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Docs/update readme #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Docs/update readme #148
Changes from 250 commits
Commits
Show all changes
605 commits
Select commit
Hold shift + click to select a range
d1392b0
fix: server add internal token
Yuuki-Sakura 1c8b5c1
feat: 邮件服务
niuwenzheng bb83215
feat: 邮件服务
niuwenzheng 4b13b18
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 142275c
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 1846595
style: lint code
Yuuki-Sakura 652365a
style: lint code
Yuuki-Sakura 5ed0f68
fix statistics user task posts db
bingyunsky 091901c
fix statistics user task posts db
bingyunsky 5bbe0c8
feat: 迁入发布记录
niuwenzheng d868b1e
feat: 迁入发布记录
niuwenzheng b475ae1
style: 1
niuwenzheng 226dbf3
style: 1
niuwenzheng 17a06e9
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng 7d1a87a
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng 5f03997
fix router bug
bingyunsky f568e0a
fix router bug
bingyunsky 1db30b6
Merge branch 'merge' of https://github.com/yikart/aitoearn-monorepo i…
bingyunsky c911a9e
Merge branch 'merge' of https://github.com/yikart/aitoearn-monorepo i…
bingyunsky e6d4f63
fix: 解决邮件发送失败
niuwenzheng b9dd9d6
fix: 解决邮件发送失败
niuwenzheng d19026c
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng ad08a36
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 7515dd9
fix: 修复更新密码
niuwenzheng 0ee7f20
fix: 修复更新密码
niuwenzheng 5fe41f9
fix: axios request
Yuuki-Sakura 5810c9d
fix: axios request
Yuuki-Sakura dba73ca
style: 1
niuwenzheng b7e1daf
style: 1
niuwenzheng 6a53d97
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng bbb602f
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 979f800
fix statistics api
bingyunsky 2a53b71
fix statistics api
bingyunsky 567314d
fix statistics api
bingyunsky 2535375
fix statistics api
bingyunsky 69c98b3
fix: internal auth
Yuuki-Sakura f52cf15
feat(apps): add channel app
wheatliu 77d7b1f
feat(apps): add channel app
wheatliu 6c2f4bb
feat(internal api): add account internal api
wheatliu a1bf91f
feat(internal api): add account internal api
wheatliu 4115b2f
fix(format): eslint autofix
wheatliu 3d6510b
fix(format): eslint autofix
wheatliu 415825b
fix: admin payment
Yuuki-Sakura b73821c
feat: 账号和草稿
niuwenzheng 21ea864
feat: 账号和草稿
niuwenzheng 40ba064
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 87dbd7e
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 529fe2e
feat: add log for cloud watch logger
Yuuki-Sakura 7966450
feat: add log for cloud watch logger
Yuuki-Sakura 4f48f45
style: 1
niuwenzheng b93deab
style: 1
niuwenzheng d6f6e07
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 29e6749
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng d34c9db
fix: 1
niuwenzheng 6f5c804
fix: 1
niuwenzheng cdc1b6a
fix: 1
niuwenzheng 7ddfde3
fix: 1
niuwenzheng b944b17
feat: update log for cloud watch logger
Yuuki-Sakura a1e375a
feat: update log for cloud watch logger
Yuuki-Sakura 4021830
feat(internal api): add publishing internal api
wheatliu 9d02f38
feat(internal api): add publishing internal api
wheatliu 76f67d1
fix(pnpm): revert pnpm-local.yaml
wheatliu a674c0e
fix(pnpm): revert pnpm-local.yaml
wheatliu f3c18cc
fix(channel): fix syntax error
wheatliu 9db79e7
fix(channel): fix syntax error
wheatliu 5e27677
fix(mongodb): upgrade mongodb version
wheatliu 5b0a458
fix(mongodb): upgrade mongodb version
wheatliu a0525f6
feat: task接口改动
niuwenzheng 117e71d
feat: task接口改动
niuwenzheng 39ea53b
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng 2100ac5
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng b9c363e
feat: s3 pre signed url upload
Yuuki-Sakura 1dccf4d
feat: s3 pre signed url upload
Yuuki-Sakura df937c7
fix statistics controller
bingyunsky 6816816
fix statistics controller
bingyunsky 86c602c
chore(channel): add internal api auth
wheatliu 6cd72b9
chore(channel): add internal api auth
wheatliu 5a30db7
chore(channel): enable internal api
wheatliu b64c206
chore(channel): enable internal api
wheatliu 9f12925
fix: 修复素材组列表
niuwenzheng fdb8ab7
fix: 修复素材组列表
niuwenzheng f3fc24c
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 72a730d
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng a590620
fix bug
bingyunsky 8883633
fix bug
bingyunsky e6ca050
feat: ai image async
Yuuki-Sakura 59242a2
feat: ai image async
Yuuki-Sakura 6f83fb1
style: 1
niuwenzheng f6389bf
fix: 1
niuwenzheng 31757cd
fix: 1
niuwenzheng 61e0ec3
feat: ai image async
Yuuki-Sakura 9d74329
feat: ai image async
Yuuki-Sakura 1bf8987
style: 1
niuwenzheng a8d9311
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng bf66ebd
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng fec2f3f
chore(channel): debug publishing
wheatliu 214495f
chore(channel): debug publishing
wheatliu 6e6c372
chore(channel api): list user all posts
wheatliu a943a6c
chore(channel api): list user all posts
wheatliu ae91bc2
style: 1
niuwenzheng ae43678
style: 1
niuwenzheng e64e3fd
feat: 管理端草稿组
niuwenzheng ef64bfe
feat: 管理端草稿组
niuwenzheng c1e121a
feat: 部分内容接口改为直接调用数据库
niuwenzheng ce8f5a5
feat: 部分内容接口改为直接调用数据库
niuwenzheng 76390de
feat: 任务数据更改到调用数据库
niuwenzheng c72b070
style: 1
niuwenzheng 8dca197
fix: 管理端设置会员信息
niuwenzheng 5e548b7
fix: 管理端设置会员信息
niuwenzheng 34c14f8
style: 更改参数验证
niuwenzheng b959e3d
style: 更改参数验证
niuwenzheng 7e917fa
style: 更换参数验证器
niuwenzheng 3353902
style: 更换参数验证器
niuwenzheng d59611c
feat: 内容部分逻辑漏洞补充
niuwenzheng 7da6e18
feat: 内容部分逻辑漏洞补充
niuwenzheng 003174a
refactor: channel redis support redis cluster
Yuuki-Sakura 0404c45
refactor: channel redis support redis cluster
Yuuki-Sakura a3e9f2a
chore: update config and deps
Yuuki-Sakura 8fcd3de
chore: update config and deps
Yuuki-Sakura 9ecd903
fix: remove nodejs-base64
Yuuki-Sakura 7716ec4
fix: remove nodejs-base64
Yuuki-Sakura 0fc9aca
chang add history posts to draft.
bingyunsky ec10517
chang add history posts to draft.
bingyunsky cc474df
feat: 草稿批量生成接口去掉类型参数
niuwenzheng d13a122
feat: 草稿批量生成接口去掉类型参数
niuwenzheng ca00487
feat: 提现接口限制
niuwenzheng 865c5b2
feat: 提现接口限制
niuwenzheng 0766227
fix: 修复积分列表返回值
niuwenzheng e200161
fix: 修复积分列表返回值
niuwenzheng b6d403a
fix(post history api): fix incompatibility issue with unionWith aggre…
wheatliu 8df0af5
fix(post history api): fix incompatibility issue with unionWith aggre…
wheatliu f44bcc6
fix: ai vo
Yuuki-Sakura 66e39a7
fix: ai vo
Yuuki-Sakura fc77860
fix(daily posts api): use internal service to fetch daily posts inste…
wheatliu 2d68677
fix(daily posts api): use internal service to fetch daily posts inste…
wheatliu ac6b253
feat: Update .gitignore rules
niuwenzheng 16cd795
feat: init
niuwenzheng 4489297
feat(internal api): add ai chat internal api
wheatliu 7918c23
feat(internal api): add ai chat internal api
wheatliu 840d01a
feat(engagement): migrate transport to api request for ai chat
wheatliu 8ea583b
feat(engagement): migrate transport to api request for ai chat
wheatliu be74a7c
fix(internal api): resolve dependencies of the ChatService
wheatliu 9c1f98a
fix(internal api): resolve dependencies of the ChatService
wheatliu c9423ac
feat(engagement): resolve dependencies of the EngagementService
wheatliu fc2df41
feat(engagement): resolve dependencies of the EngagementService
wheatliu a561545
add internal api get account by types
bingyunsky 537f4da
add internal api get account by types
bingyunsky 68358ea
fix: 修复获取任务消息总数接口
niuwenzheng 756b7bc
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 74298a4
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 25a2d22
Merge branch 'merge' into pub
niuwenzheng 67a9e76
fix: 修复用户创建新账号没有素材组
niuwenzheng 2ed5bff
fix: 修复用户创建新账号没有素材组
niuwenzheng 154a0e4
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 34431b3
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 96e23d4
refactor: auth module
Yuuki-Sakura f55a374
refactor: auth module
Yuuki-Sakura 4d4c0e7
fix: 1
niuwenzheng a9ab8a7
fix: 1
niuwenzheng dd20636
refactor: 删除无用模块
Yuuki-Sakura 1ea55aa
refactor: 删除无用模块
Yuuki-Sakura e0238ef
style: 更换参数验证
niuwenzheng 7b3149c
style: 更换参数验证
niuwenzheng 0ed065d
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng 281acb4
Merge branches 'merge' and 'merge' of github.com:yikart/aitoearn-mono…
niuwenzheng cba052e
fix: 1
niuwenzheng c968766
fix: 1
niuwenzheng b0651b6
google login
bulaienaofutuojiesenzhang 300cafe
fix(server account): resolve account creation failure
wheatliu 6e52fa1
fix(server account): resolve account creation failure
wheatliu d9bd3eb
fix(server posts): add missing id field to post object
wheatliu ea3f219
fix(server posts): add missing id field to post object
wheatliu e05e5c9
style: 更换参数验证器
niuwenzheng 6c47a23
style: 更换参数验证器
niuwenzheng 8be71f2
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 712a286
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 12c9cde
chore: update lockfile
Yuuki-Sakura e213595
chore: update lockfile
Yuuki-Sakura 0007198
fix get account list by param
bingyunsky ba3f493
fix get account list by param
bingyunsky b269575
fix(user profile report): correct api path
wheatliu 3d7e5a2
fix(user profile report): correct api path
wheatliu 6c50186
fix: auth guard reflector
Yuuki-Sakura 8ced060
fix: auth guard reflector
Yuuki-Sakura 82e7569
style: 更换参数验证
niuwenzheng 9828a85
style: 更换参数验证
niuwenzheng bcc67cd
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 0ce92a3
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 9842b67
fix(user statistics): correct api path
wheatliu 47f5596
fix(user statistics): correct api path
wheatliu caa1e74
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 4c581ef
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 18486cf
Merge branch 'merge' into pub
niuwenzheng be5d74e
fix(channel api): correct api path
wheatliu 805cde3
fix: sora2 支持文本到视频生成
Yuuki-Sakura 10fc690
fix: bug fixes
wheatliu 42bdfe9
style: 1
niuwenzheng bc4e7cc
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 7c7da12
Merge origin/merge into pub, excluding apps/aitoearn-admin-server, ap…
niuwenzheng eedf883
fix statistics posts list router
bingyunsky a5ce421
fix: 1
niuwenzheng 6ef038d
Force commit ignoring ESLint errors
niuwenzheng 8e1fbb9
ai视频
bulaienaofutuojiesenzhang 621ff93
feat: add internal decorator and server client
Yuuki-Sakura 890b3f8
erroes
bulaienaofutuojiesenzhang b7fbb9d
chore(gitignore): add prettier config
wheatliu cdeecde
chore(debug): add channel && server launch config
wheatliu 8598168
fix(channel): fix CROSSSLOT Keys issue
wheatliu 6d0eb79
fix statistics get posts list collection
bingyunsky cbf94f6
Merge branch 'merge' of https://github.com/yikart/aitoearn-monorepo i…
bingyunsky e345239
ai video
bulaienaofutuojiesenzhang 2740a89
refactor: 迁移 api 调用到 client
Yuuki-Sakura 2b685a2
fix: ai controller
Yuuki-Sakura 873e12c
fix linkedin account type
bingyunsky 287dec6
fix(aitoearn-server-client): correct api path
wheatliu d41aa53
fix(server): correct publishing api url
wheatliu a0c728c
fix: 修复支付接口
niuwenzheng 5c136a0
Merge branch 'merge' of github.com:yikart/aitoearn-monorepo into merge
niuwenzheng 0ead4b5
fix: 修复会员设置
niuwenzheng 11efa26
all
bulaienaofutuojiesenzhang d9e22f7
fix statistics query data router
bingyunsky 668661d
fix(server): correct engagement api path && service method
wheatliu 8ca3143
feat: 内部请求标识
niuwenzheng debdd3b
feat: 更改AI模块服务交互接口
niuwenzheng 26a55e8
feat: 更改云空间内部接口
niuwenzheng d0c2852
feat: 整理管理端调用接口
niuwenzheng 3c873a5
sent
bulaienaofutuojiesenzhang a88f847
Merge branch 'merge' into pub excluding specified folders
niuwenzheng b52ebef
Add rules to ignore all config.js files
niuwenzheng 0c1180f
WIP changes
niuwenzheng 4b9d8ff
jilu
bulaienaofutuojiesenzhang 199695b
zh lang
bulaienaofutuojiesenzhang 21a6b56
zy
bulaienaofutuojiesenzhang 3efb9ab
page
bulaienaofutuojiesenzhang 6a5daf5
style: 1
niuwenzheng ec9cb20
Remove .npmrc from tracking as it contains sensitive information
niuwenzheng 50e021a
Add 'project/aitoearn-monorepo/' from commit 'ec9cb20346300bc08a622d4…
niuwenzheng ece3fc3
feat: 更新文档
niuwenzheng 6b6c3ba
Merge commit '3efb9ab52ac1b276d2025344f0a143eefe222a09'
niuwenzheng 9e75e40
Add 'project/aitoearn-wxplat/' from commit '6b6c3ba22819e433ef9b4d33f…
niuwenzheng c23a219
move .npmrc
niuwenzheng ef5c907
Update README.md
whh2333 4555cb1
Update README.md
whh2333 8b38ef7
Create pr-to-feishu.yml (#145)
whh2333 734b03a
Update README.md
whh2333 2bb4ad3
Update README_CN.md
whh2333 58e97e7
fix typo: LinkedIn
wheatliu 96bc439
fix typo: LinkedIn
wheatliu 17fc050
Update README.md
whh2333 2a9a5b0
Update README.md
whh2333 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: Feishu Notify (Org-wide, No Relay) | ||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review, closed] | ||
| issues: | ||
| types: [opened, closed, reopened] | ||
|
|
||
| jobs: | ||
| notify: | ||
| uses: <your-org>/.github/.github/workflows/feishu-notify-template.yml@main | ||
| secrets: inherit | ||
| with: | ||
| important_labels: "urgent,security,release-blocker" | ||
| important_paths_regex: "^(apps/web/|infra/|payment/|security/)" | ||
| pr_min_changed_files: "30" | ||
| title_keywords_regex: "(hotfix|rollback|security|incident)" | ||
| notify_issue_on_open_close_without_labels: "false" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Editor configuration, see http://editorconfig.org | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| indent_style = space | ||
| indent_size = 2 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.md] | ||
| max_line_length = off | ||
| trim_trailing_whitespace = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,222 @@ | ||
| name: Deploy Service | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| environment: | ||
| description: 选择目标环境 | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - dev | ||
| - staging | ||
| - prod | ||
| version: | ||
| description: 镜像版本 (留空使用默认生成规则) | ||
| required: false | ||
| type: string | ||
| architectures: | ||
| description: 目标平台 (逗号分隔,如 linux/amd64,linux/arm64) | ||
| required: false | ||
| type: string | ||
| default: linux/amd64 | ||
| app_name: | ||
| description: 要构建的 Nx 应用名 (apps/<name>) | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - aitoearn-ai | ||
| - aitoearn-cloud-space | ||
| - aitoearn-user | ||
| - aitoearn-other | ||
| - aitoearn-payment | ||
| - aitoearn-server | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| env: | ||
| AWS_REGION: ap-southeast-1 | ||
| ECR_REGISTRY: 339388639667.dkr.ecr.ap-southeast-1.amazonaws.com | ||
| ROLE_TO_ASSUME: arn:aws:iam::339388639667:role/GithubActions | ||
| IMAGE_REPO: aitoearn | ||
| APP_NAME: ${{ github.event.inputs.app_name }} | ||
| HELM_REPO: yikart/k8s-apps | ||
| HELM_REPO_URL: https://github.com/yikart/k8s-apps.git | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| environment: ${{ github.event.inputs.environment }} | ||
|
|
||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build application | ||
| run: pnpm nx run ${{ env.APP_NAME }}:build | ||
|
|
||
| - name: Prepare Docker context | ||
| run: pnpm nx run ${{ env.APP_NAME }}:docker-context | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Configure AWS credentials | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ env.ROLE_TO_ASSUME }} | ||
| aws-region: ${{ env.AWS_REGION }} | ||
|
|
||
| - name: Login to Amazon ECR | ||
| id: login-ecr | ||
| uses: aws-actions/amazon-ecr-login@v2 | ||
|
|
||
| - name: Generate version | ||
| id: version | ||
| run: | | ||
| if [ -n "${{ github.event.inputs.version }}" ]; then | ||
| VERSION="${{ github.event.inputs.version }}" | ||
| else | ||
| VERSION=$(date +%Y%m%d)-$(git rev-parse --short HEAD) | ||
| fi | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Build and push application | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: ./tmp/docker-context | ||
| file: ./tmp/docker-context/Dockerfile | ||
| push: true | ||
| tags: ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.APP_NAME }}:${{ steps.version.outputs.version }} | ||
| platforms: ${{ github.event.inputs.architectures }} | ||
| build-args: | | ||
| APP_NAME=${{ env.APP_NAME }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| - uses: actions/create-github-app-token@v2 | ||
| id: generate-token | ||
| with: | ||
| app-id: ${{ secrets.APP_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| owner: yikart | ||
| repositories: k8s-apps | ||
|
|
||
| - name: Clone Helm repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| repository: ${{ env.HELM_REPO }} | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
| path: k8s-apps | ||
|
|
||
| - name: Update Helm values | ||
| run: | | ||
| cd k8s-apps | ||
| ENV="${{ github.event.inputs.environment }}" | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
| APP="${{ env.APP_NAME }}" | ||
| VALUES_FILE="${ENV}/values-${APP}.yaml" | ||
|
|
||
| if [ -f "$VALUES_FILE" ]; then | ||
| sed -i "s|tag: .*|tag: ${VERSION}|g" "$VALUES_FILE" | ||
| echo "Updated ${APP} tag to ${VERSION}" | ||
| else | ||
| echo "Warning: Values file not found: $VALUES_FILE" | ||
| fi | ||
|
|
||
| - name: Update config files | ||
| run: | | ||
| ENV="${{ github.event.inputs.environment }}" | ||
| CONFIG_FILE="apps/${{ env.APP_NAME }}/config/${ENV}.config.js" | ||
| if [ -f "$CONFIG_FILE" ]; then | ||
| CONFIG_DIR="k8s-apps/${ENV}/configmaps/${{ env.APP_NAME }}" | ||
| mkdir -p "$CONFIG_DIR" | ||
| cp "$CONFIG_FILE" "${CONFIG_DIR}/config.js" | ||
| echo "Updated ${{ env.APP_NAME }} config for ${ENV} environment" | ||
| else | ||
| echo "Warning: Config file not found: $CONFIG_FILE" | ||
| fi | ||
|
|
||
| - name: Get source repository changes | ||
| id: source-changes | ||
| run: | | ||
| COMMIT_HISTORY=$(git log --oneline -10 --pretty=format:"- [%h](${{ github.server_url }}/${{ github.repository }}/commit/%H) %s") | ||
| echo 'commit_history<<EOF' >> $GITHUB_OUTPUT | ||
| echo "$COMMIT_HISTORY" >> $GITHUB_OUTPUT | ||
| echo 'EOF' >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Create Pull Request in Helm Repo | ||
| id: create-pr | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
| path: ./k8s-apps | ||
| branch: deploy/${{ env.APP_NAME }}-${{ github.event.inputs.environment }}-${{ steps.version.outputs.version }} | ||
| title: 'deploy(${{ github.event.inputs.environment }}): update ${{ env.APP_NAME }} to ${{ steps.version.outputs.version }}' | ||
| body: | | ||
| ## 🚀 部署请求 | ||
|
|
||
| **应用**: ${{ env.APP_NAME }} | ||
| **环境**: ${{ github.event.inputs.environment }} | ||
| **版本**: ${{ steps.version.outputs.version }} | ||
|
|
||
| ### 📋 变更详情 | ||
|
|
||
| - 更新镜像标签: `${{ env.APP_NAME }}:${{ steps.version.outputs.version }}` | ||
| - 目标环境: `${{ github.event.inputs.environment }}` | ||
|
|
||
| ### 📝 源代码变更历史 | ||
|
|
||
| 最近的提交记录: | ||
| ${{ steps.source-changes.outputs.commit_history }} | ||
|
|
||
| ### 🔗 相关信息 | ||
|
|
||
| - **源仓库**: ${{ github.repository }} | ||
| - **源提交**: [`${{ github.sha }}`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}) | ||
| - **镜像地址**: `${{ env.ECR_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.APP_NAME }}:${{ steps.version.outputs.version }}` | ||
| - **构建日志**: [GitHub Actions Run ${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
| commit-message: | | ||
| deploy(${{ github.event.inputs.environment }}): update ${{ env.APP_NAME }} to ${{ steps.version.outputs.version }} | ||
|
|
||
| Update image tag for ${{ env.APP_NAME }} in ${{ github.event.inputs.environment }} environment | ||
| Source-Commit: ${{ github.sha }} | ||
| Triggered-By: GitHub Actions | ||
| base: main | ||
|
|
||
| - name: Summary | ||
| if: always() | ||
| run: | | ||
| echo "## 📦部署摘要" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **应用**: ${{ env.APP_NAME }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **环境**: ${{ github.event.inputs.environment }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **版本**: ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **镜像**: \`${{ env.ECR_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.APP_NAME }}:${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| if [ "${{ steps.create-pr.outputs.pull-request-number }}" != "" ]; then | ||
| echo "- **状态**: ✅ Pull Request 已创建到 Helm 仓库" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **PR链接**: ${{ steps.create-pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY | ||
| else | ||
| echo "- **状态**: ⚠️ 无变更,未创建 Pull Request" >> $GITHUB_STEP_SUMMARY | ||
| fi | ||
|
|
||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "### 🔗 快速链接" >> $GITHUB_STEP_SUMMARY | ||
| echo "- [Helm 仓库](${{ env.HELM_REPO_URL }})" >> $GITHUB_STEP_SUMMARY | ||
| echo "- [源代码提交](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})" >> $GITHUB_STEP_SUMMARY |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.