mirror of
https://git.bjxgj.com/xgj/xgj-actions.git
synced 2025-10-14 11:23:37 +08:00
fix: 规范化示例文件和文档中的格式,优化参数描述,提升可读性
This commit is contained in:
@@ -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 }}
|
||||
|
||||
|
Reference in New Issue
Block a user