🔨 Add develop build

This commit is contained in:
2025-08-07 20:33:37 +08:00
parent ee8e9df12e
commit 554f73b550

View File

@@ -1,158 +1,189 @@
name: Build and Push Microservices name: Build and Push Microservices
on: on:
push: push:
branches: branches:
- master - master
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-sphere: build-sphere:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup NBGV - name: Setup NBGV
uses: dotnet/nbgv@master uses: dotnet/nbgv@master
id: nbgv id: nbgv
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Sphere Docker image - name: Build and push DysonNetwork.Sphere Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: DysonNetwork.Sphere/Dockerfile file: DysonNetwork.Sphere/Dockerfile
context: . context: .
push: true push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-sphere:latest tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-sphere:latest
platforms: linux/amd64 platforms: linux/amd64
build-pass: build-pass:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup NBGV - name: Setup NBGV
uses: dotnet/nbgv@master uses: dotnet/nbgv@master
id: nbgv id: nbgv
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Pass Docker image - name: Build and push DysonNetwork.Pass Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: DysonNetwork.Pass/Dockerfile file: DysonNetwork.Pass/Dockerfile
context: . context: .
push: true push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pass:latest tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pass:latest
platforms: linux/amd64 platforms: linux/amd64
build-pusher: build-pusher:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup NBGV - name: Setup NBGV
uses: dotnet/nbgv@master uses: dotnet/nbgv@master
id: nbgv id: nbgv
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Pusher Docker image - name: Build and push DysonNetwork.Pusher Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: DysonNetwork.Pusher/Dockerfile file: DysonNetwork.Pusher/Dockerfile
context: . context: .
push: true push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pusher:latest tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pusher:latest
platforms: linux/amd64 platforms: linux/amd64
build-drive: build-drive:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup NBGV - name: Setup NBGV
uses: dotnet/nbgv@master uses: dotnet/nbgv@master
id: nbgv id: nbgv
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Drive Docker image - name: Build and push DysonNetwork.Drive Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: DysonNetwork.Drive/Dockerfile file: DysonNetwork.Drive/Dockerfile
context: . context: .
push: true push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-drive:latest tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-drive:latest
platforms: linux/amd64 platforms: linux/amd64
build-gateway: build-gateway:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup NBGV - name: Setup NBGV
uses: dotnet/nbgv@master uses: dotnet/nbgv@master
id: nbgv id: nbgv
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Gateway Docker image - name: Build and push DysonNetwork.Gateway Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: DysonNetwork.Gateway/Dockerfile file: DysonNetwork.Gateway/Dockerfile
context: . context: .
push: true push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-gateway:latest tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-gateway:latest
platforms: linux/amd64 platforms: linux/amd64
build-develop:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup NBGV
uses: dotnet/nbgv@master
id: nbgv
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push DysonNetwork.Develop Docker image
uses: docker/build-push-action@v6
with:
file: DysonNetwork.Develop/Dockerfile
context: .
push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-develop:latest
platforms: linux/amd64