2025-09-25 05:11:03 -07:00

61 lines
1.5 KiB
YAML

name: CI
on:
push:
branches:
- cicd
pull_request:
branches:
- cicd
env:
DOMAIN_URL: git.kxsw.us #*修改为你自己的域名
REPO: ${{ vars.REPO }}
jobs:
build:
runs-on: ppanel-web
strategy:
matrix:
# 只有node支持版本号别名1
node: ['20.15.1']
steps:
- name: Checkout code
uses: https://gitea.cn/actions/checkout@v4
- name: change npm registry mirror
run: npm config set registry https://registry.npmmirror.com
### https://github.com/pnpm/action-setup
- name: Set up Node.js
uses: pnpm/action-setup@v4
with:
version: 9.15.9
run_install: false
- id: tool-cache
uses: https://${{ vars.GIT_USERNAME }}:${{ vars.GIT_PASSWORD }}@${{ env.DOMAIN_URL }}/actions/gitea-tool-cache@main
with:
# 只有node支持版本号别名
node-version: lts
- uses: https://gitea.cn/actions/setup-node@main
with:
# gitea-tool-cache导出 node 具体版本
node-version: ${{ steps.tool-cache.outputs.node-version }}
registry-url: https://registry.npmmirror.com
cache: pnpm
- name: set cavans registry
run: pnpm config set canvas_binary_host_mirror https://registry.npmmirror.com/-/binary/canvas
- name: Install dependencies
run: pnpm install
- name: Run Build Project
run: pnpm run build
- name: Run Build Docker
run: make build