mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
96 lines
2.4 KiB
YAML
96 lines
2.4 KiB
YAML
name: manual-build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dockerTag:
|
|
description: "tag name of docker image"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build-frontend:
|
|
name: Build Frontend
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Frontend
|
|
uses: ./.github/actions/build-frontend
|
|
|
|
- name: Upload dist
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend
|
|
path: ./admin-frontend/build/
|
|
|
|
docker-main:
|
|
name: Docker main
|
|
runs-on: ubuntu-latest
|
|
needs: [build-frontend]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download frontend files
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: frontend
|
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./docker/Dockerfile_with_frontend
|
|
push: true
|
|
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
docker-main-sentry:
|
|
name: Docker main sentry
|
|
runs-on: ubuntu-latest
|
|
needs: [build-frontend]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download frontend files
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: frontend
|
|
path: ./src/plugins/nonebot_bison/admin_page/dist
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./docker/Dockerfile_with_frontend_sentry
|
|
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}-sentry
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|