You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2023/02/24 07:52:46 UTC

[incubator-devlake] branch main updated: fix: can not build and push devlake image (#4513)

This is an automated email from the ASF dual-hosted git repository.

zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 389f3e9f8 fix: can not build and push devlake image (#4513)
389f3e9f8 is described below

commit 389f3e9f80868c1462c0cda084bce414608e3b8c
Author: abeizn <zi...@merico.dev>
AuthorDate: Fri Feb 24 15:52:41 2023 +0800

    fix: can not build and push devlake image (#4513)
---
 .github/workflows/build.yml | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bd01c657c..fd873527c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,7 +22,7 @@ env:
 on:
   push:
     tags:
-      - 'v*'
+      - "v*"
 jobs:
   build-and-push-builder:
     name: Build and Push devlake builder
@@ -45,6 +45,7 @@ jobs:
           push: true
           target: builder
           tags: ${{ secrets.DOCKERHUB_OWNER }}/devlake:amd64-builder
+          dockerfile: ./backend/Dockerfile
           platforms: linux/amd64
           cache-from: ${{ secrets.DOCKERHUB_OWNER }}/devlake:amd64-builder
           cache-to: ${{ secrets.DOCKERHUB_OWNER }}/devlake:amd64-builder
@@ -69,6 +70,7 @@ jobs:
           push: true
           target: base
           tags: ${{ secrets.DOCKERHUB_OWNER }}/devlake:base
+          dockerfile: ./backend/Dockerfile
           platforms: linux/amd64,linux/arm64
           cache-from: ${{ secrets.DOCKERHUB_OWNER }}/devlake:base
           cache-to: ${{ secrets.DOCKERHUB_OWNER }}/devlake:base
@@ -78,7 +80,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        platform: ['arm64', 'amd64']
+        platform: ["arm64", "amd64"]
     steps:
       - uses: actions/checkout@v3
       - name: Get short sha
@@ -139,12 +141,12 @@ jobs:
       - name: Get push tags
         id: get_push_tags
         run: |
-            image_name=${{ secrets.DOCKERHUB_OWNER }}/devlake
-            if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
-                echo "TAGS=${image_name}:latest,${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
-            else
-                echo "TAGS=${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
-            fi
+          image_name=${{ secrets.DOCKERHUB_OWNER }}/devlake
+          if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+              echo "TAGS=${image_name}:latest,${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
+          else
+              echo "TAGS=${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
+          fi
       - name: Build and push lake image
         uses: docker/build-push-action@v3
         with:
@@ -204,12 +206,12 @@ jobs:
       - name: Get push tags
         id: get_push_tags
         run: |
-            image_name=${{ secrets.DOCKERHUB_OWNER }}/${{ matrix.build.image }}
-            if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
-                echo "TAGS=${image_name}:latest,${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
-            else
-                echo "TAGS=${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
-            fi
+          image_name=${{ secrets.DOCKERHUB_OWNER }}/${{ matrix.build.image }}
+          if printf ${{ github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
+              echo "TAGS=${image_name}:latest,${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
+          else
+              echo "TAGS=${image_name}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
+          fi
       - name: Build and push ${{ matrix.build.name }} image
         uses: docker/build-push-action@v3
         with:
@@ -217,4 +219,3 @@ jobs:
           push: true
           tags: ${{ steps.get_push_tags.outputs.TAGS }}
           platforms: linux/amd64,linux/arm64
-