+26
@@ -0,0 +1,26 @@
|
||||
name: ci-run
|
||||
description: "跑一個 CI 工作:還原快取(ci-cache)→ 在 ci-env 容器裡執行指令。要在 checkout 之後使用,需要工具鏈時呼叫的工作流要有 env: GO_VERSION、NODE_VERSION"
|
||||
inputs:
|
||||
command:
|
||||
description: "要在 ci-env 容器裡執行的 shell 指令"
|
||||
required: true
|
||||
cache_key:
|
||||
description: "快取 key,例如 ci-home-${{ hashFiles('go.sum', 'web/package-lock.json') }}"
|
||||
required: true
|
||||
cache_restore_keys:
|
||||
description: "找不到完全相同的 key 時,依序嘗試的前綴(每行一個)"
|
||||
default: ""
|
||||
name:
|
||||
description: "執行指令的步驟名稱"
|
||||
default: ci
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: https://gitea.jsc.idv.tw/actions/ci-cache@v0.0.1
|
||||
with:
|
||||
key: ${{ inputs.cache_key }}
|
||||
restore_keys: ${{ inputs.cache_restore_keys }}
|
||||
- name: ${{ inputs.name }}
|
||||
uses: https://gitea.jsc.idv.tw/actions/ci-env@v0.0.1
|
||||
with:
|
||||
command: ${{ inputs.command }}
|
||||
Reference in New Issue
Block a user