From bf014f87060fc0274ea7c43a252937c1a70cbe97 Mon Sep 17 00:00:00 2001 From: Keepers Date: Wed, 14 Sep 2022 15:51:29 -0600 Subject: [PATCH] fix build script, try local build again (#848) ## Type of change - [x] :bug: Bugfix - [x] :computer: CI/Deployment ## Issue(s) * #573 ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/workflows/image.yml | 7 +++++-- build/build.sh | 2 +- build/multiplatform-binary.sh | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index c02797d6c..a703845d7 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -47,17 +47,20 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - id: hash + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + # deploy the image - name: Build image and push to GitHub Container Registry env: - sha: git_hash=$(git rev-parse --short "$GITHUB_SHA") + imageName: ghcr.io/alcionai/corso uses: docker/build-push-action@v3 with: context: . file: ./build/Dockerfile platforms: ${{ env.PLATFORMS }} push: true - tags: ghcr.io/alcionai/corso:${{ env.sha }} + tags: ${{ env.imageName }}:latest,${{ env.imageName }}:${{ steps.hash.outputs.sha_short }} # use the github cache cache-from: type=gha cache-to: type=gha,mode=max diff --git a/build/build.sh b/build/build.sh index 7d68f6015..19502092a 100755 --- a/build/build.sh +++ b/build/build.sh @@ -63,7 +63,7 @@ do --env GOARCH=${GOARCH} \ --entrypoint /usr/local/go/bin/go \ golang:${GOVER} \ - build ${CORSO_BUILD_ARGS} + build -o corso ${CORSO_BUILD_ARGS} set +x mkdir -p ${PROJECT_ROOT}/bin/${GOOS}-${GOARCH} diff --git a/build/multiplatform-binary.sh b/build/multiplatform-binary.sh index 2633abad3..ba65765a8 100755 --- a/build/multiplatform-binary.sh +++ b/build/multiplatform-binary.sh @@ -46,7 +46,7 @@ do cd ${PROJECT_ROOT}/src; \ GOOS=${GOOS} \ GOARCH=${GOARCH} \ - go build -o ${OS_ARCH_DIR} "$CORSO_BUILD_ARGS" + go build -o ${OS_ARCH_DIR}/corso $CORSO_BUILD_ARGS set +x