fix build script, try local build again (#848)

## Type of change

- [x] 🐛 Bugfix
- [x] 💻 CI/Deployment

## Issue(s)

* #573

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Keepers 2022-09-14 15:51:29 -06:00 committed by GitHub
parent 8b83a728ef
commit bf014f8706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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}

View File

@ -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