489cc94316
- 使用 npm 全局安装 OpenCode,支持版本管理和自动更新 - 智能缓存策略:缓存 npm 目录和全局安装,加速后续构建 - 支持淘宝镜像源和自定义 npm 镜像,国内环境友好 - 版本检测:自动比对已安装版本,避免重复安装 - 输出安装版本、缓存命中状态和更新状态 - 提供详细的使用文档和多场景示例
22 lines
413 B
YAML
22 lines
413 B
YAML
name: Custom Registry Example
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 使用自定义 npm 镜像源
|
|
uses: ./.gitea/actions/setup-opencode
|
|
with:
|
|
version: '1.2.3'
|
|
npm-registry: 'https://registry.npmmirror.com'
|
|
|
|
- name: 构建
|
|
run: |
|
|
opencode build
|