瀏覽代碼

Merge pull request #4 from langgenius/feat/0.2.2

Feat/0.2.2
Yeuoly 1 年之前
父節點
當前提交
d63780ba37
共有 4 個文件被更改,包括 27 次插入17 次删除
  1. 12 4
      .github/workflows/build-universal.yml
  2. 13 3
      .github/workflows/build.yml
  3. 1 5
      docker/amd64/dockerfile
  4. 1 5
      docker/arm64/dockerfile

+ 12 - 4
.github/workflows/build-universal.yml

@@ -52,8 +52,16 @@ jobs:
             type=sha,enable=true,priority=100,prefix=,suffix=,format=long
             type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
 
-      - name: Build Universal Docker Image
-        run: docker manifest create ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-amd64 ${{ steps.meta.outputs.tags }}-arm64
-      
+      - name: Build Universal Docker Images
+        run:
+          for tag in $(echo ${{ steps.meta.outputs.tags }} | tr ',' '\n');
+          do
+            docker manifest create $tag $tag-amd64 $tag-arm64;
+          done
+
       - name: Push Universal Docker Image
-        run: docker manifest push ${{ steps.meta.outputs.tags }}
+        run: 
+          for tag in $(echo ${{ steps.meta.outputs.tags }} | tr ',' '\n');
+          do
+            docker manifest push $tag;
+          done

+ 13 - 3
.github/workflows/build.yml

@@ -59,7 +59,17 @@ jobs:
         run: bash ./build/build_${{ inputs.arch }}.sh
 
       - name: Run Build Docker Image
-        run: docker build -t ${{ steps.meta.outputs.tags }}-${{ inputs.arch }} -f ./docker/${{ inputs.arch }}/dockerfile .
+        run: docker build -t dify-sandbox -f ./docker/${{ inputs.arch }}/dockerfile .
 
-      - name: Run Push Docker Image
-        run: docker push ${{ steps.meta.outputs.tags }}-${{ inputs.arch }}
+      - name: Tag Docker Images
+        run: 
+          for tag in $(echo ${{ steps.meta.outputs.tags }} | tr ',' '\n');
+          do
+            docker tag dify-sandbox "$tag-${{ inputs.arch }}";
+          done
+      - name: Push Docker Image
+        run:
+          for tag in $(echo ${{ steps.meta.outputs.tags }} | tr ',' '\n');
+          do
+            docker push $tag-${{ inputs.arch }};
+          done

+ 1 - 5
docker/amd64/dockerfile

@@ -1,10 +1,6 @@
 FROM python:3.10-slim
 
-# use aliyun mirror
-RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources \
-    && sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources
-RUN apt-get clean && apt-get update 
-RUN apt-get install -y pkg-config libseccomp-dev wget xz-utils
+RUN apt-get clean && apt-get update && apt-get install -y pkg-config libseccomp-dev wget xz-utils
 # copy main binary to /main
 COPY main /main
 COPY conf/config.yaml /conf/config.yaml

+ 1 - 5
docker/arm64/dockerfile

@@ -1,10 +1,6 @@
 FROM python:3.10-slim
 
-# use aliyun mirror
-RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources \
-    && sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources
-RUN apt-get clean && apt-get update 
-RUN apt-get install -y pkg-config libseccomp-dev wget xz-utils
+RUN apt-get clean && apt-get update && apt-get install -y pkg-config libseccomp-dev wget xz-utils
 # copy main binary to /main
 COPY main /main
 COPY conf/config.yaml /conf/config.yaml