From 554f73b55012ae2915c7be1f5625b066bbdbf117 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 7 Aug 2025 20:33:37 +0800 Subject: [PATCH] :hammer: Add develop build --- .github/workflows/docker-build.yml | 347 ++++++++++++++++------------- 1 file changed, 189 insertions(+), 158 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 300faea..db6bdb8 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,158 +1,189 @@ -name: Build and Push Microservices - -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - build-sphere: - 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.Sphere Docker image - uses: docker/build-push-action@v6 - with: - file: DysonNetwork.Sphere/Dockerfile - context: . - push: true - tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-sphere:latest - platforms: linux/amd64 - - build-pass: - 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.Pass Docker image - uses: docker/build-push-action@v6 - with: - file: DysonNetwork.Pass/Dockerfile - context: . - push: true - tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pass:latest - platforms: linux/amd64 - - build-pusher: - 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.Pusher Docker image - uses: docker/build-push-action@v6 - with: - file: DysonNetwork.Pusher/Dockerfile - context: . - push: true - tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pusher:latest - platforms: linux/amd64 - - build-drive: - 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.Drive Docker image - uses: docker/build-push-action@v6 - with: - file: DysonNetwork.Drive/Dockerfile - context: . - push: true - tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-drive:latest - platforms: linux/amd64 - - build-gateway: - 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.Gateway Docker image - uses: docker/build-push-action@v6 - with: - file: DysonNetwork.Gateway/Dockerfile - context: . - push: true - tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-gateway:latest - platforms: linux/amd64 + name: Build and Push Microservices + + on: + push: + branches: + - master + workflow_dispatch: + + jobs: + build-sphere: + 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.Sphere Docker image + uses: docker/build-push-action@v6 + with: + file: DysonNetwork.Sphere/Dockerfile + context: . + push: true + tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-sphere:latest + platforms: linux/amd64 + + build-pass: + 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.Pass Docker image + uses: docker/build-push-action@v6 + with: + file: DysonNetwork.Pass/Dockerfile + context: . + push: true + tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pass:latest + platforms: linux/amd64 + + build-pusher: + 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.Pusher Docker image + uses: docker/build-push-action@v6 + with: + file: DysonNetwork.Pusher/Dockerfile + context: . + push: true + tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pusher:latest + platforms: linux/amd64 + + build-drive: + 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.Drive Docker image + uses: docker/build-push-action@v6 + with: + file: DysonNetwork.Drive/Dockerfile + context: . + push: true + tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-drive:latest + platforms: linux/amd64 + + build-gateway: + 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.Gateway Docker image + uses: docker/build-push-action@v6 + with: + file: DysonNetwork.Gateway/Dockerfile + context: . + push: true + tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-gateway:latest + 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 +