47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- cicd
|
|
pull_request:
|
|
branches:
|
|
- cicd
|
|
|
|
env:
|
|
DOMAIN_URL: git.studyfor.work #*修改为你自己的域名
|
|
REPO: ${{ vars.REPO }}
|
|
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ vars.DOCKER_PASSWORD}}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# 只有node支持版本号别名
|
|
node: ['20.15.1']
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: https://gitea.cn/actions/checkout@v4
|
|
|
|
### https://github.com/pnpm/action-setup
|
|
- name: Set up Node.js
|
|
uses: https://github.com/pnpm/action-setup@v4
|
|
with:
|
|
version: 9.15.9
|
|
run_install: false
|
|
|
|
- uses: https://gitea.cn/actions/setup-node@v4
|
|
with:
|
|
# gitea-tool-cache导出 node 具体版本
|
|
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: Run Build Docker
|
|
run: make build
|