mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-08-31 22:36:23 +00:00
✨ feat: 重构构建工作流,分离前端和后端构建步骤
This commit is contained in:
18
.github/workflows/build.yaml
vendored
18
.github/workflows/build.yaml
vendored
@ -7,7 +7,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
build-and-push-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -29,9 +29,23 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/neo-blog-frontend:latest
|
||||
|
||||
build-and-push-backend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/neo-blog-backend:latest
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/neo-blog-backend:latest
|
||||
|
Reference in New Issue
Block a user