Files
action-ci/README.md
T
bot 1b7bd3926b
ci / test (push) Canceled after 16s
初始版本
2026-11-05 03:16:37 +00:00

26 lines
904 B
Markdown
Raw 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.
# 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`)。