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