From dca0a5c06463f194c1bce181d389a0e9af101e91 Mon Sep 17 00:00:00 2001 From: PoAn Yang Date: Mon, 27 May 2024 15:14:59 +0800 Subject: [PATCH] fix: local make build Signed-off-by: PoAn Yang --- .github/workflows/build.yml | 13 ++++++++++++- build-image.sh | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c17d1d5a9..965f4b2583 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,21 @@ jobs: - name: Run dapper run: dapper + make: + name: make check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # local buid check + - name: Run make + run: make + build_images: name: Build images runs-on: ubuntu-latest - needs: flake8 + needs: [flake8, make] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/build-image.sh b/build-image.sh index 378529001e..4965d475a4 100755 --- a/build-image.sh +++ b/build-image.sh @@ -18,11 +18,11 @@ case $(uname -m) in esac echo "Building for ${ARCH}" -# update base image to get latest changes -BASE_IMAGE=`grep FROM package/Dockerfile | awk '{print $2}'` +# update base image to get latest changes +BASE_IMAGE=`grep FROM package/Dockerfile | awk '{print $2}'` docker pull ${BASE_IMAGE} -docker build --build-arg ARCH=${ARCH} -t ${image} -f manager/integration/Dockerfile . +docker build --build-arg TARGETPLATFORM="linux/${ARCH}" -t ${image} -f manager/integration/Dockerfile . mkdir -p bin echo ${image} > bin/latest_image echo Built image ${image}