初始版本
ci / test (push) Canceled after 16s

This commit is contained in:
bot
2026-11-05 03:16:37 +00:00
commit 1b7bd3926b
5 changed files with 74 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# action-ci
action repo 的共用 CI:先 `shellcheck`,再(可選)在 `ci-env` 容器裡跑 Go 腳本測試(`GO_VERSION=go.mod`,用 go.mod 的版本),最後(可選)`docker build` 檢查映像檔。
```yaml
steps:
- uses: actions/checkout@v4
- uses: https://gitea.jsc.idv.tw/actions/action-ci@v0.0.1
with:
go_test: true
docker_build: true
```
## 輸入
|名稱|預設|說明|
|---|---|---|
|`shellcheck_files`|`*.sh`|shellcheck 要檢查的檔案(空白分隔、可用萬用字元),沒有符合的就略過|
|`go_test`|`false`|`true`=跑 Go 測試|
|`go_test_command`|`go vet ./... && go test ./test/`|Go 測試的指令|
|`docker_build`|`false`|`true`=`docker build` 檢查 Dockerfile|
內部引用的 `shellcheck`、`ci-env` 版本寫死在 `action.yml`,升級要先發它們再發 `action-ci`。
圖示:`icon.svg`(頭像用 `icon.png`)。