From 2fb0b0e39a68bf0b00d1b0f2b8c73ced7214ff82 Mon Sep 17 00:00:00 2001 From: sunbk201 Date: Thu, 14 Nov 2024 00:45:27 +0800 Subject: [PATCH] feat: add support for manual workflow dispatch and enhance Docker image build process --- .github/workflows/release.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8cebb4c..32180ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,7 @@ name: Build and Push Docker Image on: + workflow_dispatch: push: tags: - 'v*' @@ -26,9 +27,30 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push Docker images + + - name: Build and push Docker latest images uses: docker/build-push-action@v6 + if: github.event_name == 'workflow_dispatch' + with: + context: . + push: true + platforms: | + linux/amd64, + linux/arm/v7, + linux/arm64, + linux/386, + linux/mips64le, + linux/mipsle, + linux/riscv64, + windows/amd64, + windows/arm64, + darwin/amd64, + darwin/arm64 + tags: ${{ github.repository }}:latest + + - name: Build and push Docker images with Release tag + uses: docker/build-push-action@v6 + if: github.event_name == 'push' with: context: . push: true