初始版本:從 feather-vault 搬出
ci / test (push) Successful in 1m1s

This commit is contained in:
bot
2026-11-05 02:54:23 +00:00
commit bae9657059
11 changed files with 218 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# 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`)。