調整:第三方 action 與工具的版本也從 Gitea 變數取得
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
||||
name: action-ci
|
||||
description: "action repo 的共用 CI:checkout → shellcheck → Go 腳本測試(有 go.mod 與 test/ 才跑,在 ci-env 容器裡,Go 版本取 go.mod)→ 建置映像檔(有 Dockerfile 才跑,可選擇實際執行並檢查輸出)。自動偵測,各 repo 的 ci.yaml 不必設開關。內部用的 shellcheck、ci-env 版本取自呼叫端的 Gitea 變數 ACTION_SHELLCHECK_VERSION、ACTION_CI_ENV_VERSION"
|
||||
description: "action repo 的共用 CI:checkout → shellcheck → Go 腳本測試(有 go.mod 與 test/ 才跑,在 ci-env 容器裡,Go 版本取 go.mod)→ 建置映像檔(有 Dockerfile 才跑,可選擇實際執行並檢查輸出)。自動偵測,各 repo 的 ci.yaml 不必設開關。版本都取自呼叫端的 Gitea 變數:ACTION_CHECKOUT_VERSION、ACTION_SHELLCHECK_VERSION、ACTION_CI_ENV_VERSION、TOOL_SHELLCHECK_VERSION(shellcheck 本身)"
|
||||
inputs:
|
||||
checkout:
|
||||
description: "true=先 checkout;false=呼叫端已經 checkout(例如要用 uses: ./ 測自己)"
|
||||
@@ -24,7 +24,7 @@ runs:
|
||||
steps:
|
||||
- name: checkout
|
||||
if: ${{ inputs.checkout == 'true' }}
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
||||
- name: 偵測
|
||||
id: detect
|
||||
shell: bash
|
||||
@@ -35,6 +35,7 @@ runs:
|
||||
uses: https://gitea.jsc.idv.tw/actions/shellcheck@${{ vars.ACTION_SHELLCHECK_VERSION }}
|
||||
with:
|
||||
files: ${{ inputs.shellcheck_files }}
|
||||
version: ${{ vars.TOOL_SHELLCHECK_VERSION }}
|
||||
- name: Go 測試
|
||||
if: ${{ steps.detect.outputs.go == 'true' }}
|
||||
uses: https://gitea.jsc.idv.tw/actions/ci-env@${{ vars.ACTION_CI_ENV_VERSION }}
|
||||
|
||||
Reference in New Issue
Block a user