diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 6950cda..9789999 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,7 +1,5 @@ name: ci on: - push: - branches: [main] pull_request: concurrency: group: ci-${{ github.ref }} diff --git a/README.md b/README.md index f80ee07..0d044a2 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ jobs: |`version`|這次發的版本(跳過時是下一版的預覽,沒有實際推送)| |`skip`|`true`=只動文件等檔案,沒有發版| -內部用的 `next-version` 版本取自呼叫端 repo 的 Gitea 變數 `ACTION_NEXT_VERSION_VERSION`,所以呼叫端要先設好。呼叫端用標籤引用 action(版本取自 Gitea 變數),發版後要把 `ACTION_<名稱>_VERSION` 改成新標籤才會採用。 +內部用的版本取自呼叫端 repo 的 Gitea 變數 `ACTION_CHECKOUT_VERSION`、`ACTION_NEXT_VERSION_VERSION`,所以呼叫端要先設好。呼叫端用標籤引用 action(版本取自 Gitea 變數),發版後要把 `ACTION_<名稱>_VERSION` 改成新標籤才會採用。 ## 開發與發版 diff --git a/action.yml b/action.yml index b22392c..bb54259 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: action-cd -description: "action repo 的共用 CD:checkout(PR 來源最新提交)→ next-version 算下一版 → 沒有跳過就打標籤並推送。只動文件、圖示、測試、.gitea/、go.mod 時跳過。內部用的 next-version 版本取自呼叫端的 Gitea 變數 ACTION_NEXT_VERSION_VERSION" +description: "action repo 的共用 CD:checkout(PR 來源最新提交)→ next-version 算下一版 → 沒有跳過就打標籤並推送。只動文件、圖示、測試、.gitea/、go.mod 時跳過。內部用的版本取自呼叫端的 Gitea 變數:ACTION_CHECKOUT_VERSION、ACTION_NEXT_VERSION_VERSION" inputs: token: description: "推送標籤用的權杖(需要 write:repository);空=用內建 github.token" @@ -17,7 +17,7 @@ outputs: runs: using: composite steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }}