mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
♻️ 更新 action workflow
This commit is contained in:
parent
8550ff975a
commit
6c8b37f085
8
.github/actions/setup-python/action.yml
vendored
8
.github/actions/setup-python/action.yml
vendored
@ -14,7 +14,9 @@ runs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python-version }}
|
python-version: ${{ inputs.python-version }}
|
||||||
- name: Setup Poetry
|
|
||||||
uses: Gr1N/setup-poetry@v9
|
- name: Install the latest version of uv
|
||||||
|
uses: astral-sh/setup-uv@v4
|
||||||
with:
|
with:
|
||||||
poetry-version: "1.7.1"
|
version: "latest"
|
||||||
|
enable-cache: true
|
||||||
|
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
@ -127,12 +127,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download frontend files
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: frontend
|
|
||||||
path: ./nonebot_bison/admin_page/dist
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -144,7 +138,7 @@ jobs:
|
|||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend
|
file: ./docker/Dockerfile
|
||||||
push: false
|
push: false
|
||||||
load: true
|
load: true
|
||||||
tags: felinae98/nonebot-bison:dummy
|
tags: felinae98/nonebot-bison:dummy
|
||||||
@ -174,7 +168,7 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend
|
file: ./docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: felinae98/nonebot-bison:${{ env.GIT_BRANCH_NAME }}
|
tags: felinae98/nonebot-bison:${{ env.GIT_BRANCH_NAME }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
@ -188,12 +182,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download frontend files
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: frontend
|
|
||||||
path: ./nonebot_bison/admin_page/dist
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -215,8 +203,8 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend_sentry
|
file: ./docker/Dockerfile_without_browser
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: felinae98/nonebot-bison:${{ env.GIT_BRANCH_NAME }}-sentry
|
tags: felinae98/nonebot-bison:${{ env.GIT_BRANCH_NAME }}-nobrowser
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
36
.github/workflows/manual-build.yaml
vendored
36
.github/workflows/manual-build.yaml
vendored
@ -9,35 +9,12 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
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:
|
docker-main:
|
||||||
name: Docker main
|
name: Docker main
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-frontend]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -54,7 +31,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend
|
file: ./docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}
|
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
@ -63,16 +40,9 @@ jobs:
|
|||||||
docker-main-sentry:
|
docker-main-sentry:
|
||||||
name: Docker main sentry
|
name: Docker main sentry
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-frontend]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -89,7 +59,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend_sentry
|
file: ./docker/Dockerfile_without_browser
|
||||||
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}-sentry
|
tags: felinae98/nonebot-bison:${{ inputs.dockerTag }}-nobrowser
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -61,17 +61,10 @@ jobs:
|
|||||||
|
|
||||||
publish-docker:
|
publish-docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-frontend
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download frontend files
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: frontend
|
|
||||||
path: ./nonebot_bison/admin_page/dist
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -92,7 +85,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend
|
file: ./docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
felinae98/nonebot-bison:latest
|
felinae98/nonebot-bison:latest
|
||||||
@ -104,10 +97,10 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile_with_frontend_sentry
|
file: ./docker/Dockerfile_without_browser
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
felinae98/nonebot-bison:${{ env.TAG_NAME }}-sentry
|
felinae98/nonebot-bison:${{ env.TAG_NAME }}-nobrowser
|
||||||
felinae98/nonebot-bison:sentry
|
felinae98/nonebot-bison:nobrowser
|
||||||
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