mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 04:43:00 +08:00
ci: 尝试使用 matrix 简化
This commit is contained in:
parent
f2d7e9b541
commit
8ea7841e49
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@ -67,6 +67,13 @@ jobs:
|
|||||||
name: Docker
|
name: Docker
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-frontend, test]
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -94,18 +101,8 @@ jobs:
|
|||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend
|
file: ${{ matrix.file }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: felinae98/nonebot-bison:main
|
tags: ${{ matrix.tags }}
|
||||||
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-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
Loading…
x
Reference in New Issue
Block a user