From f86d9ce67ae833481661a55ed5cf14f11edd7c6d Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Tue, 29 Aug 2023 11:25:26 +0800 Subject: [PATCH] ci: fix test. --- .github/workflows/build.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1843f2d..746e0aa7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -159,6 +159,7 @@ jobs: path: backend/src/dist - name: Build and push + if: ${{ needs.version-info.outputs.release == 1 && needs.version-info.outputs.dev != 1 }} uses: docker/build-push-action@v4 with: context: . @@ -170,6 +171,29 @@ jobs: cache-from: type=gha, scope=${{ github.workflow }} cache-to: type=gha, scope=${{ github.workflow }} + - name: Build and push dev + if: ${{ needs.version-info.outputs.dev == 1 }} + uses: docker/build-push-action@v4 + with: + context: . + builder: ${{ steps.buildx.output.name }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: ${{ github.event_name == 'push' }} + tags: ${{ steps.meta-dev.outputs.tags }} + labels: ${{ steps.meta-dev.outputs.labels }} + cache-from: type=gha, scope=${{ github.workflow }} + cache-to: type=gha, scope=${{ github.workflow }} + + - name: Build test + if: ${{ needs.version-info.outputs.release == 0 }} + uses: docker/build-push-action@v4 + with: + context: . + builder: ${{ steps.buildx.output.name }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: false + tags: estrellaxd/auto_bangumi:test + release: runs-on: ubuntu-latest needs: [build-docker, build-webui, version-info] @@ -189,7 +213,7 @@ jobs: cd webui && ls -al && tree && zip -r dist.zip dist - name: Generate Release - if: ${{ needs.version-info.outputs.release == 1 && needs.version-info.outputs.dev != 1 }} + if: ${{ needs.version-info.outputs.dev != 1 }} uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.event.pull_request.title }}