Files
ci-env/README.md
T
2026-11-05 03:17:10 +00:00

26 lines
1018 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.
# ci-env
在 Docker 容器裡執行一段 shell 指令:映像檔有 Chromium 的系統依賴與字型、git、make、python3;Go 與 Node 依環境變數 `GO_VERSION`、`NODE_VERSION` 下載到 workspace 的 `.ci-home` 快取(沒設的不裝)。
## 用法
版本由呼叫端的 Gitea Actions 變數決定(例如 `vars.ACTION_CI_ENV_VERSION`),不要用分支名稱:runner 依 ref 重用舊映像檔,改了腳本不會生效,所以每次改動都發新標籤。
```yaml
- uses: https://gitea.jsc.idv.tw/actions/ci-env@${{ vars.ACTION_CI_ENV_VERSION }}
with:
command: ...
```
## 輸入
|名稱|必填|預設|說明|
|---|---|---|---|
|`command`|是||要執行的 shell 指令(工作目錄是 workspace,已設好 GOPATH、PATH 等)|
## 開發
`ci.yaml` 用共用的 [action-ci](https://gitea.jsc.idv.tw/actions/action-ci) 跑 shellcheck,並用 `uses: ./` 實際執行一次(同時檢查映像檔建得起來)。
圖示:`icon.svg`(Gitea 儲存庫頭像用 `icon.png`)。