Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12c8e06f73 | ||
|
|
bee68baf02 | ||
|
|
05008353ac |
@@ -1,7 +1,5 @@
|
|||||||
name: ci
|
name: ci
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.ref }}
|
group: ci-${{ github.ref }}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ steps:
|
|||||||
|
|
||||||
## 內部引用的版本
|
## 內部引用的版本
|
||||||
|
|
||||||
`ci-cache`、`ci-env` 的版本取自呼叫端 repo 的 Gitea 變數 `ACTION_CI_CACHE_VERSION`、`ACTION_CI_ENV_VERSION`,不寫死在 `action.yml`,所以呼叫端要先設好這兩個變數。需要工具鏈時,呼叫端的工作流要有 `env: GO_VERSION`、`NODE_VERSION`。
|
內部用的版本都取自呼叫端 repo 的 Gitea 變數,不寫死在 `action.yml`,所以呼叫端要先設好:`ACTION_CHECKOUT_VERSION`、`ACTION_CI_CACHE_VERSION`、`ACTION_CI_ENV_VERSION`。需要工具鏈時,呼叫端的工作流要有 `env: GO_VERSION`、`NODE_VERSION`。
|
||||||
|
|
||||||
## 開發與發版
|
## 開發與發版
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
name: ci-run
|
name: ci-run
|
||||||
description: "跑一個 CI 工作:checkout → 還原快取(ci-cache,key 由 cache_files 的內容雜湊決定)→ 在 ci-env 容器裡執行指令。內部用的 ci-cache、ci-env 版本取自呼叫端的 Gitea 變數 ACTION_CI_CACHE_VERSION、ACTION_CI_ENV_VERSION。需要工具鏈時呼叫的工作流要有 env: GO_VERSION、NODE_VERSION"
|
description: "跑一個 CI 工作:checkout → 還原快取(ci-cache,key 由 cache_files 的內容雜湊決定)→ 在 ci-env 容器裡執行指令。內部用的版本取自呼叫端的 Gitea 變數:ACTION_CHECKOUT_VERSION、ACTION_CI_CACHE_VERSION、ACTION_CI_ENV_VERSION。需要工具鏈時呼叫的工作流要有 env: GO_VERSION、NODE_VERSION"
|
||||||
inputs:
|
inputs:
|
||||||
command:
|
command:
|
||||||
description: "要在 ci-env 容器裡執行的 shell 指令"
|
description: "要在 ci-env 容器裡執行的 shell 指令"
|
||||||
@@ -24,7 +24,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
if: ${{ inputs.checkout == 'true' }}
|
if: ${{ inputs.checkout == 'true' }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
||||||
- name: 算快取 key
|
- name: 算快取 key
|
||||||
id: key
|
id: key
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user