ci: fix test.

This commit is contained in:
EstrellaXD
2023-08-29 11:25:26 +08:00
parent 0b6d0647d4
commit f86d9ce67a

View File

@@ -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 }}