mirror of https://github.com/jumpserver/jumpserver
feat: add auto translate readme
parent
ff0f9eb6eb
commit
a46a81d477
|
@ -1,20 +1,40 @@
|
||||||
name: Translate README.md
|
name: Translate README
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
languages:
|
target_langs:
|
||||||
description: "Target languages"
|
description: "Target Languages"
|
||||||
required: false
|
required: false
|
||||||
default: "zh-hans,zh-hant,ja,pt-br"
|
default: "zh-hans,zh-hant,ja,pt-br"
|
||||||
|
gen_dir_path:
|
||||||
|
description: "Generate Dir Name"
|
||||||
|
required: false
|
||||||
|
default: "readmes/"
|
||||||
|
push_branch:
|
||||||
|
description: "Push Branch"
|
||||||
|
required: false
|
||||||
|
default: "pr@dev@translate_readme"
|
||||||
|
prompt:
|
||||||
|
description: "AI Translate Prompt"
|
||||||
|
required: false
|
||||||
|
default: "Do not translate any content under the ‘## License’ section.\nKeep all content, Only delete the first line below [//]: # (Language navigation)."
|
||||||
|
|
||||||
|
gpt_mode:
|
||||||
|
description: "GPT Mode"
|
||||||
|
required: false
|
||||||
|
default: "gpt-4o-mini"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Auto Translate
|
- name: Auto Translate
|
||||||
uses: BaiJiangJie/translate-readme@main
|
uses: BaiJiangJie/translate-readme@main
|
||||||
with:
|
|
||||||
gpt_token: ${{ secrets.GPT_API_TOKEN }}
|
|
||||||
gpt_mode: 'gpt-4o-mini'
|
|
||||||
target_languages: ${{ github.event.inputs.languages }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
||||||
|
OPENAI_API_KEY: ${{ secrets.GPT_API_TOKEN }}
|
||||||
|
GPT_MODE: ${{ github.event.inputs.gpt_mode }}
|
||||||
|
TARGET_LANGUAGES: ${{ github.event.inputs.target_langs }}
|
||||||
|
PUSH_BRANCH: ${{ github.event.inputs.push_branch }}
|
||||||
|
GEN_DIR_PATH: ${{ github.event.inputs.gen_dir_path }}
|
||||||
|
PROMPT: ${{ github.event.inputs.prompt }}
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
[![][github-release-shield]][github-release-link]
|
[![][github-release-shield]][github-release-link]
|
||||||
[![][github-stars-shield]][github-stars-link]
|
[![][github-stars-shield]][github-stars-link]
|
||||||
|
|
||||||
**English** · [简体中文](./README.zh-CN.md)
|
[//]: # (Language navigation)
|
||||||
|
**English** · [中文(简体)](./readmes/README.zh-hans.md) · [中文(繁體)](./readmes/README.zh-hant.md) · [日本語](./readmes/README.ja.md) · [Português (Brasil)](./readmes/README.pt-br.md)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue