Browse Source

chore: release.yml (#422)

Shuyoou 1 year ago
parent
commit
fd5c0de484
2 changed files with 27 additions and 12 deletions
  1. 13 1
      .github/workflows/ci.yml
  2. 14 11
      .github/workflows/release.yml

+ 13 - 1
.github/workflows/ci.yml

@@ -16,5 +16,17 @@ jobs:
         with:
           node-version: 18
 
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
       - name: Docker Build
-        run: docker build -t zilliz/attu:dev --build-arg VERSION=dev .
+        uses: docker/build-push-action@v5
+        with:
+          context: .
+          platforms: linux/amd64,linux/arm64
+          tags: zilliz/attu:dev
+          build-args: VERSION=dev
+          push: false

+ 14 - 11
.github/workflows/release.yml

@@ -14,20 +14,23 @@ jobs:
         with:
           node-version: 18
 
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+      
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
       - name: Login to DockerHub
         uses: docker/login-action@v1
         with:
           username: ${{ secrets.DOCKER_USERNAME }}
           password: ${{ secrets.DOCKER_PWD }}
 
-      - name: Docker Build
-        run: docker build -t zilliz/attu:${GITHUB_REF#refs/tags/} --build-arg VERSION=${GITHUB_REF#refs/tags/} .
-
-      - name: Docker tag
-        run: docker tag zilliz/attu:${GITHUB_REF#refs/tags/} zilliz/attu:latest
-
-      - name: Docker Push version
-        run: docker push zilliz/attu:${GITHUB_REF#refs/tags/}
-
-      - name: Docker Push lastest
-        run: docker push zilliz/attu
+      - name: Build and push
+        uses: docker/build-push-action@v5
+        with:
+          context: .
+          platforms: linux/amd64,linux/arm64
+          tags: zilliz/attu:${GITHUB_REF#refs/tags/},zilliz/attu:latest
+          build-args: VERSION=${GITHUB_REF#refs/tags/}
+          push: true