Merge branch 'main' into next

This commit is contained in:
felinae98
2022-06-05 16:48:40 +08:00
29 changed files with 864 additions and 208 deletions
+56 -13
View File
@@ -1,10 +1,24 @@
name: CI
name: test-build
on:
push:
branches:
- main
paths:
- admin-frontend/**
- docker/**
- src/**
- tests/**
- pyproject.toml
- poetry.lock
pull_request:
paths:
- admin-frontend/**
- docker/**
- src/**
- tests/**
- pyproject.toml
- poetry.lock
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -63,18 +77,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 +107,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