fix: 规范化示例文件和文档中的格式,优化参数描述,提升可读性

This commit is contained in:
Lyda
2025-08-21 18:19:02 +08:00
parent d17dea4ca0
commit 1949a48d96
3 changed files with 25 additions and 25 deletions

View File

@@ -1,9 +1,9 @@
name: Latest Version Demo
on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main ]
branches: [main]
jobs:
show-version-info:
@@ -12,13 +12,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取完整历史,确保能获取所有标签
fetch-depth: 0 # 获取完整历史,确保能获取所有标签
- name: Get Version Info
id: version
uses: ./trigger-version
with:
version-prefix: 'v'
version-prefix: "v"
use-latest-version: true
- name: Display Version Information
@@ -43,10 +43,10 @@ jobs:
run: |
echo "使用最新版本进行部署: ${{ steps.version.outputs.latest-version }}"
echo "镜像标签: myapp:${{ steps.version.outputs.latest-version-with-dash }}"
# 示例:构建 Docker 镜像
# docker build -t myapp:${{ steps.version.outputs.latest-version-with-dash }} .
# 示例:设置 Kubernetes 部署
# kubectl set image deployment/myapp container=myapp:${{ steps.version.outputs.latest-version-with-dash }}