Skip to content

Commit

Permalink
👷 add manual build
Browse files Browse the repository at this point in the history
  • Loading branch information
felinae98 committed Feb 12, 2024
1 parent f7b5394 commit 2973eae
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/manual-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
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@v5
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@v5
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

0 comments on commit 2973eae

Please sign in to comment.