From 19b4720c9bb8fb943093549ef5174d238c2d787b Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Wed, 6 May 2026 14:02:32 +0800 Subject: [PATCH] docs: add zh-CN readme --- README.md | 12 ++++++++---- README.zh-CN.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 README.zh-CN.md diff --git a/README.md b/README.md index b32fe98..293cb5c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +

+ 中文 | English +

+ # Setup ADC This action sets up the [api7/adc](https://github.com/api7/adc) CLI tool for use in GitHub Actions workflows. @@ -27,10 +31,10 @@ jobs: ## Inputs -| Input | Description | Required | Default | -| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------- | -| `version` | Version of ADC to install (e.g. `0.25.0`, `latest`) | No | `latest` | -| `token` | GitHub token for API requests. Typically not supplied by the user — the default is sufficient on github.com. On GHES, pass a PAT if rate limited. | No | `${{ github.server_url == 'https://github.com' && github.token | | '' }}` | +| Input | Description | Required | Default | +| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------- | +| `version` | Version of ADC to install (e.g. `0.25.0`, `latest`) | No | `latest` | +| `token` | GitHub token for API requests. Typically not supplied by the user — the default is sufficient on github.com. On GHES, pass a PAT if rate limited. | No | ${{ github.server_url == 'https://github.com' && github.token || '' }} | ## Outputs diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..b05badc --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,47 @@ +

+ 中文 | English +

+ +# Setup ADC + +此 Action 用于在 GitHub Actions 工作流中设置 [api7/adc](https://github.com/api7/adc) CLI 工具。 + +## 使用方式 + +> **安全性:** 请将工作流固定到特定的[发布标签](https://github.com/api7/setup-adc/releases) +>(例如 `@v1`),或为了最大程度的不可变性,使用完整的提交 SHA +>(例如 `@a824008085750b8e136effc585c3cd6082bd575f`)。使用 `@main` +> 便于开发,但可能会在不经意间引入破坏性变更。 + + +```yaml +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: api7/setup-adc@v1 + id: setup + with: + version: 0.25.0 # 可选,默认为 latest + + - run: adc --version + - run: adc ping +``` + + +## 输入参数 + +| 参数 | 说明 | 必填 | 默认值 | +| --------- | -------------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------- | +| `version` | 要安装的 ADC 版本(例如 `0.25.0`、`latest`) | 否 | `latest` | +| `token` | 用于 GitHub API 请求的令牌。通常无需用户提供——默认值在 github.com 上已足够。在 GHES 上遇到限流时可传入个人访问令牌。 | 否 | ${{ github.server_url == 'https://github.com' && github.token || '' }} | + +## 输出参数 + +| 输出 | 说明 | +| ------------- | ----------------- | +| `adc-version` | 已安装的 ADC 版本 | + +## 许可证 + +Apache-2.0