Files
sync-branch/README.md
T
bot bae9657059
ci / test (push) Successful in 1m1s
初始版本:從 feather-vault 搬出
2026-11-05 02:54:23 +00:00

29 lines
911 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# sync-branch
目標分支不存在或已包含該提交就什麼都不做;有衝突就失敗。
## 用法
版本由呼叫端的 Gitea Actions 變數決定(例如 `vars.ACTION_SYNC_BRANCH_VERSION`),不要用分支名稱:runner 依 ref 重用舊映像檔,改了腳本不會生效,所以每次改動都發新標籤。
```yaml
- uses: https://gitea.jsc.idv.tw/actions/sync-branch@${{ vars.ACTION_SYNC_BRANCH_VERSION }}
with:
source: ...
target: ...
```
## 輸入
|名稱|必填|預設|說明|
|---|---|---|---|
|`source`|是||來源分支名稱(例如 main)|
|`target`|是||目標分支名稱(例如 dev)|
|`sha`||`${{ github.sha }}`|要合併進去的來源提交,預設是目前的 github.sha|
## 開發
`ci.yaml` 跑 shellcheck、`test/` 的腳本黑箱測試(`go test ./test/`)、建置映像檔。
圖示:`icon.svg`(Gitea 儲存庫頭像用 `icon.png`)。