mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 04:43:00 +08:00
ci: 添加 Docker
This commit is contained in:
parent
977d45bfbb
commit
743d863e13
47
.github/workflows/codecov.yml
vendored
47
.github/workflows/codecov.yml
vendored
@ -25,7 +25,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: frontend
|
name: frontend
|
||||||
path: ./admin-frontend/build/
|
path: ./admin-frontend/build/
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test Coverage
|
name: Test Coverage
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@ -66,3 +65,49 @@ jobs:
|
|||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
env_vars: OS,PYTHON_VERSION
|
env_vars: OS,PYTHON_VERSION
|
||||||
|
docker:
|
||||||
|
name: Docker
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-frontend, test]
|
||||||
|
|
||||||
|
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
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: felinae98/nonebot-bison:main
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Build Sentry 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