mirror of
https://git.bjxgj.com/xgj/xgj-actions.git
synced 2025-10-15 17:03:38 +08:00
fix: 规范化示例文件和文档中的格式,优化参数描述,提升可读性
This commit is contained in:
@@ -16,14 +16,14 @@
|
|||||||
## 输入参数
|
## 输入参数
|
||||||
|
|
||||||
| 参数名 | 描述 | 必需 | 默认值 |
|
| 参数名 | 描述 | 必需 | 默认值 |
|
||||||
| -------------------------- | ------------------------------ | ---- | ------- |
|
| -------------------- | -------------------------------- | ---- | ------- |
|
||||||
| `version-prefix` | 版本前缀,用于匹配版本标签或分支 | 否 | `v` |
|
| `version-prefix` | 版本前缀,用于匹配版本标签或分支 | 否 | `v` |
|
||||||
| `use-latest-version` | 在非版本触发时是否使用最新版本 | 否 | `false` |
|
| `use-latest-version` | 在非版本触发时是否使用最新版本 | 否 | `false` |
|
||||||
|
|
||||||
## 输出参数
|
## 输出参数
|
||||||
|
|
||||||
| 参数名 | 描述 | 示例值 |
|
| 参数名 | 描述 | 示例值 |
|
||||||
| ------------------------------ | ---------------------------- | ------------------------------- |
|
| -------------------------- | -------------------------- | ------------------------------- |
|
||||||
| `ref-type` | 引用类型 | `tag` 或 `branch` |
|
| `ref-type` | 引用类型 | `tag` 或 `branch` |
|
||||||
| `ref-name` | 引用名称 | `v1.2.3`、`main`、`feature/xxx` |
|
| `ref-name` | 引用名称 | `v1.2.3`、`main`、`feature/xxx` |
|
||||||
| `is-version-trigger` | 是否为版本触发 | `true` 或 `false` |
|
| `is-version-trigger` | 是否为版本触发 | `true` 或 `false` |
|
||||||
@@ -94,7 +94,7 @@ jobs:
|
|||||||
|
|
||||||
### 使用最新版本功能
|
### 使用最新版本功能
|
||||||
|
|
||||||
```yaml
|
````yaml
|
||||||
- name: 获取版本信息(启用最新版本)
|
- name: 获取版本信息(启用最新版本)
|
||||||
id: version-info
|
id: version-info
|
||||||
uses: ./trigger-version
|
uses: ./trigger-version
|
||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
uses: actions/xgj/trigger-version@v1
|
uses: actions/xgj/trigger-version@v1
|
||||||
with:
|
with:
|
||||||
version-prefix: "release-"
|
version-prefix: "release-"
|
||||||
```
|
````
|
||||||
|
|
||||||
### 完整的 CI/CD 流程
|
### 完整的 CI/CD 流程
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
name: Latest Version Demo
|
name: Latest Version Demo
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, develop ]
|
branches: [main, develop]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
show-version-info:
|
show-version-info:
|
||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
uses: ./trigger-version
|
uses: ./trigger-version
|
||||||
with:
|
with:
|
||||||
version-prefix: 'v'
|
version-prefix: "v"
|
||||||
use-latest-version: true
|
use-latest-version: true
|
||||||
|
|
||||||
- name: Display Version Information
|
- name: Display Version Information
|
||||||
|
Reference in New Issue
Block a user