+28
@@ -0,0 +1,28 @@
|
||||
name: next-version
|
||||
description: "計算下一個版本號(Docker action,bash+git+curl):讀 git 標籤(可選再加 Go 套件庫)中最新的 vX.Y.Z,只遞增 patch、每位最大 9;測試通道輸出 vX.Y.Z-dev.N。變更全是文件等檔案時 skip=true。需要 fetch-depth: 0 的 checkout"
|
||||
inputs:
|
||||
channel:
|
||||
description: "release=正式版 vX.Y.Z;dev=測試版 vX.Y.Z-dev.N(X.Y.Z 是下一個正式版)"
|
||||
default: release
|
||||
go_registry:
|
||||
description: "true=也把 Gitea 的 Go 套件庫已有的版本算進去(需要 token 有 read:package);false=只看 git 標籤"
|
||||
default: "false"
|
||||
package:
|
||||
description: "go_registry 為 true 時查詢的套件名稱(預設是儲存庫名稱)"
|
||||
default: ""
|
||||
docs_pattern:
|
||||
description: "只動這些檔案就跳過(skip=true)的 egrep 規則(預設 ^docs/|\\.md$,即 docs/ 與 *.md)"
|
||||
default: ""
|
||||
token:
|
||||
description: "go_registry 為 true 時查詢套件庫用的權杖(需要 read:package)"
|
||||
default: ""
|
||||
outputs:
|
||||
version:
|
||||
description: 下一個版本(沒有任何版本時是 v0.0.1)
|
||||
skip:
|
||||
description: "true=和最新標籤相比只動了 docs_pattern 的檔案,不需要發佈"
|
||||
latest:
|
||||
description: 目前最新的正式版(沒有時是空字串)
|
||||
runs:
|
||||
using: docker
|
||||
image: Dockerfile
|
||||
Reference in New Issue
Block a user