2024-06-12 14:27:00 +08:00
|
|
|
name: pigallery2
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
# 工作流程,可包含多个作业
|
|
|
|
jobs:
|
|
|
|
# 作业1名称
|
|
|
|
pigallery2-Gitea-Actions:
|
|
|
|
# 指定的运行器环境
|
|
|
|
runs-on: node-lts
|
|
|
|
|
|
|
|
# 作业包含一系列任务,称为 steps
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up node
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies
|
2024-07-03 17:07:23 +08:00
|
|
|
run: npm install --unsafe-perm
|
2024-06-12 14:27:00 +08:00
|
|
|
- name: Build with Npm create-release
|
2024-07-03 17:07:23 +08:00
|
|
|
run: npm run create-release -- --skip-opt-packages=ffmpeg-static,ffprobe-static --force-opt-packages
|
2024-07-06 19:48:53 +08:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-06-12 14:27:00 +08:00
|
|
|
#build镜像并push到中央仓库中
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
2024-06-12 14:56:45 +08:00
|
|
|
context: ./
|
2024-06-12 14:27:00 +08:00
|
|
|
file: ./Dockerfile.build
|
|
|
|
push: true
|
2024-07-03 17:07:23 +08:00
|
|
|
tags: k2.xuthus83.cn:6001/pigallery2:latest
|