将 CI/Deploy 从本地脚本与中间复用层切换为公共 reusable-prepare-workspace 工作流,并规范 deploy 命令中的密钥注入方式,降低重复维护与调用兼容风险。 Made-with: Cursor
This commit is contained in:
@@ -6,31 +6,15 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
# workflow_call 调用示例(先保留注释,不启用):
|
||||
# ci:
|
||||
# uses: ./.gitea/workflows/reusable-ci.yml
|
||||
# with:
|
||||
# node_major: "22"
|
||||
# yarn_version: "stable"
|
||||
# run_lint: true
|
||||
# run_tsc: true
|
||||
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_MAJOR: "22"
|
||||
YARN_VERSION: "stable"
|
||||
steps:
|
||||
- name: Prepare workspace (checkout + node/yarn)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
chmod +x .gitea/scripts/prepare-workspace.sh
|
||||
./.gitea/scripts/prepare-workspace.sh \
|
||||
"${{ github.server_url }}/${{ github.repository }}.git" \
|
||||
"${{ github.sha }}"
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
- name: TypeScript check
|
||||
run: yarn tsc --noEmit
|
||||
uses: platform/workflow/.gitea/workflows/reusable-prepare-workspace.yml@1.1
|
||||
with:
|
||||
repo_url: "${{ github.server_url }}/${{ github.repository }}.git"
|
||||
git_sha: "${{ github.sha }}"
|
||||
node_major: "22"
|
||||
yarn_version: "stable"
|
||||
run_commands: |
|
||||
set -euo pipefail
|
||||
yarn install --frozen-lockfile
|
||||
yarn lint
|
||||
yarn tsc --noEmit
|
||||
|
||||
Reference in New Issue
Block a user