Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p align="center">
<a href="README.zh-CN.md">中文</a> | <strong>English</strong>
</p>

# Setup ADC

This action sets up the [api7/adc](https://github.com/api7/adc) CLI tool for use in GitHub Actions workflows.
Expand Down Expand Up @@ -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 | <code>${{ github.server_url == 'https://github.com' && github.token &#124;&#124; '' }}</code> |

## Outputs

Expand Down
47 changes: 47 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<p align="center">
<strong>中文</strong> | <a href="README.md">English</a>
</p>

# Setup ADC

此 Action 用于在 GitHub Actions 工作流中设置 [api7/adc](https://github.com/api7/adc) CLI 工具。

## 使用方式

> **安全性:** 请将工作流固定到特定的[发布标签](https://github.com/api7/setup-adc/releases)
>(例如 `@v1`),或为了最大程度的不可变性,使用完整的提交 SHA
>(例如 `@a824008085750b8e136effc585c3cd6082bd575f`)。使用 `@main`
> 便于开发,但可能会在不经意间引入破坏性变更。

<!-- x-release-please-start-version -->
```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
```
<!-- x-release-please-end -->

## 输入参数

| 参数 | 说明 | 必填 | 默认值 |
| --------- | -------------------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------------------------------- |
| `version` | 要安装的 ADC 版本(例如 `0.25.0`、`latest`) | 否 | `latest` |
| `token` | 用于 GitHub API 请求的令牌。通常无需用户提供——默认值在 github.com 上已足够。在 GHES 上遇到限流时可传入个人访问令牌。 | 否 | <code>${{ github.server_url == 'https://github.com' && github.token &#124;&#124; '' }}</code> |

## 输出参数

| 输出 | 说明 |
| ------------- | ----------------- |
| `adc-version` | 已安装的 ADC 版本 |

## 许可证

Apache-2.0
Loading