2024-04-15 20:54:26 +08:00
|
|
|
name: pigallery2
|
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
# 工作流程,可包含多个作业
|
|
|
|
jobs:
|
|
|
|
# 作业1名称
|
|
|
|
pigallery2-Gitea-Actions:
|
|
|
|
# 指定的运行器环境
|
2024-04-16 02:01:04 +08:00
|
|
|
runs-on: node-lts
|
2024-04-16 01:41:14 +08:00
|
|
|
|
2024-04-15 20:54:26 +08:00
|
|
|
# 作业包含一系列任务,称为 steps
|
|
|
|
steps:
|
2024-04-16 01:25:52 +08:00
|
|
|
- uses: actions/checkout@v4
|
2024-04-16 01:42:51 +08:00
|
|
|
- name: Set up node
|
2024-04-16 01:37:44 +08:00
|
|
|
uses: actions/setup-node@v4
|
2024-04-16 01:25:52 +08:00
|
|
|
with:
|
2024-04-16 03:08:15 +08:00
|
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Build with Npm build
|
2024-04-16 10:40:04 +08:00
|
|
|
run: npm run build
|
2024-04-16 03:08:15 +08:00
|
|
|
- name: Build with Npm create-release
|
2024-04-16 10:40:04 +08:00
|
|
|
run: npm run create-release
|
2024-04-16 01:25:52 +08:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2024-04-16 02:18:56 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-04-16 01:25:52 +08:00
|
|
|
#build镜像并push到中央仓库中
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
2024-04-16 02:18:56 +08:00
|
|
|
uses: docker/build-push-action@v5
|
2024-04-16 01:25:52 +08:00
|
|
|
with:
|
|
|
|
context: ./
|
2024-04-16 10:40:04 +08:00
|
|
|
file: ./release/Dockerfile.build
|
2024-04-16 01:25:52 +08:00
|
|
|
push: true
|
2024-04-16 01:41:14 +08:00
|
|
|
tags: k2.xuthus83.cn:6001/pigallery2:latest
|