Jelajahi Sumber

fix: actions build error (#551)

Signed-off-by: 吴小白 <296015668@qq.com>
吴小白 1 tahun lalu
induk
melakukan
8c3fa7742a

+ 5 - 4
.github/workflows/build-dev.yml

@@ -1,4 +1,4 @@
-name: Build Image
+name: Build Dev Image
 
 
 on:
 on:
   push:
   push:
@@ -7,7 +7,7 @@ on:
 
 
 jobs:
 jobs:
   build:
   build:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-latest-16c64g
     steps:
     steps:
       - uses: actions/checkout@v4
       - uses: actions/checkout@v4
       - uses: docker/setup-qemu-action@v3
       - uses: docker/setup-qemu-action@v3
@@ -27,7 +27,7 @@ jobs:
           password: ${{ secrets.GITHUB_TOKEN }}
           password: ${{ secrets.GITHUB_TOKEN }}
 
 
       - name: Build and Push Image
       - name: Build and Push Image
-        uses: docker/build-push-action@v5
+        uses: docker/build-push-action@v6
         with:
         with:
           context: .
           context: .
           file: Dockerfile
           file: Dockerfile
@@ -40,7 +40,7 @@ jobs:
           cache-to: type=gha,mode=max
           cache-to: type=gha,mode=max
 
 
       - name: Build and Push Debug Image
       - name: Build and Push Debug Image
-        uses: docker/build-push-action@v5
+        uses: docker/build-push-action@v6
         with:
         with:
           context: .
           context: .
           file: Dockerfile-debug
           file: Dockerfile-debug
@@ -48,6 +48,7 @@ jobs:
           push: true
           push: true
           build-args: |
           build-args: |
             VERSION=${{ env.version }}
             VERSION=${{ env.version }}
+            BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}
           tags: |
           tags: |
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}-debug
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}-debug
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.full_version }}
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.full_version }}

+ 4 - 3
.github/workflows/build-linux-image.yml

@@ -7,7 +7,7 @@ on:
 
 
 jobs:
 jobs:
   build:
   build:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-latest-16c64g
     steps:
     steps:
       - uses: actions/checkout@v4
       - uses: actions/checkout@v4
       - uses: docker/setup-qemu-action@v3
       - uses: docker/setup-qemu-action@v3
@@ -24,7 +24,7 @@ jobs:
           password: ${{ secrets.GITHUB_TOKEN }}
           password: ${{ secrets.GITHUB_TOKEN }}
 
 
       - name: Build and Push Image
       - name: Build and Push Image
-        uses: docker/build-push-action@v5
+        uses: docker/build-push-action@v6
         with:
         with:
           context: .
           context: .
           file: Dockerfile
           file: Dockerfile
@@ -38,7 +38,7 @@ jobs:
           cache-to: type=gha,mode=max
           cache-to: type=gha,mode=max
 
 
       - name: Build and Push Debug Image
       - name: Build and Push Debug Image
-        uses: docker/build-push-action@v5
+        uses: docker/build-push-action@v6
         with:
         with:
           context: .
           context: .
           file: Dockerfile-debug
           file: Dockerfile-debug
@@ -46,6 +46,7 @@ jobs:
           push: true
           push: true
           build-args: |
           build-args: |
             VERSION=${{ env.version }}
             VERSION=${{ env.version }}
+            BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}
           tags: |
           tags: |
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}-debug
             ghcr.io/${{ github.repository_owner }}/fish-speech:${{ env.version }}-debug
           outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
           outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true

+ 3 - 0
.github/workflows/docs.yml

@@ -3,6 +3,9 @@ on:
   push:
   push:
     branches:
     branches:
       - main
       - main
+    paths:
+      - 'docs/**'
+      - 'mkdocs.yml'
 
 
 permissions:
 permissions:
   contents: write
   contents: write

+ 3 - 2
Dockerfile-debug

@@ -1,6 +1,7 @@
-ARG VERSION
+ARG VERSION=dev
+ARG BASE_IMAGE=ghcr.io/fishaudio/fish-speech:${VERSION}
 
 
-FROM ghcr.io/fishaudio/fish-speech:${VERSION}
+FROM ${BASE_IMAGE}
 
 
 ARG TOOLS="               \
 ARG TOOLS="               \
         git               \
         git               \