mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 12:23:00 +08:00
update ci
This commit is contained in:
parent
f9067454b8
commit
d107aa1cac
55
.github/workflows/main.yml
vendored
55
.github/workflows/main.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: CI
|
||||
name: Test and Build Test Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -63,18 +63,10 @@ jobs:
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
env_vars: OS,PYTHON_VERSION
|
||||
docker:
|
||||
name: Docker
|
||||
docker-main:
|
||||
name: Docker main
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-frontend, test]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- file: ./docker/Dockerfile_with_frontend
|
||||
tags: felinae98/nonebot-bison:main
|
||||
- file: ./docker/Dockerfile_with_frontend_sentry
|
||||
tags: felinae98/nonebot-bison:main-sentry
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@ -101,8 +93,45 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.file }}
|
||||
file: ./docker/Dockerfile_with_frontend
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ matrix.tags }}
|
||||
tags: felinae98/nonebot-bison:main
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
docker-main-sentry:
|
||||
name: Docker main sentry
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-frontend, test]
|
||||
if: github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download frontend files
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: frontend
|
||||
path: ./src/plugins/nonebot_bison/admin_page/dist
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile_with_frontend_sentry
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: felinae98/nonebot-bison:main-sentry
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
Loading…
x
Reference in New Issue
Block a user