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:
parent
8b83a728ef
commit
bf014f8706
7
.github/workflows/image.yml
vendored
7
.github/workflows/image.yml
vendored
@ -47,17 +47,20 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- id: hash
|
||||||
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
# deploy the image
|
# deploy the image
|
||||||
- name: Build image and push to GitHub Container Registry
|
- name: Build image and push to GitHub Container Registry
|
||||||
env:
|
env:
|
||||||
sha: git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
imageName: ghcr.io/alcionai/corso
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./build/Dockerfile
|
file: ./build/Dockerfile
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/alcionai/corso:${{ env.sha }}
|
tags: ${{ env.imageName }}:latest,${{ env.imageName }}:${{ steps.hash.outputs.sha_short }}
|
||||||
# use the github cache
|
# use the github cache
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
@ -63,7 +63,7 @@ do
|
|||||||
--env GOARCH=${GOARCH} \
|
--env GOARCH=${GOARCH} \
|
||||||
--entrypoint /usr/local/go/bin/go \
|
--entrypoint /usr/local/go/bin/go \
|
||||||
golang:${GOVER} \
|
golang:${GOVER} \
|
||||||
build ${CORSO_BUILD_ARGS}
|
build -o corso ${CORSO_BUILD_ARGS}
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
mkdir -p ${PROJECT_ROOT}/bin/${GOOS}-${GOARCH}
|
mkdir -p ${PROJECT_ROOT}/bin/${GOOS}-${GOARCH}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ do
|
|||||||
cd ${PROJECT_ROOT}/src; \
|
cd ${PROJECT_ROOT}/src; \
|
||||||
GOOS=${GOOS} \
|
GOOS=${GOOS} \
|
||||||
GOARCH=${GOARCH} \
|
GOARCH=${GOARCH} \
|
||||||
go build -o ${OS_ARCH_DIR} "$CORSO_BUILD_ARGS"
|
go build -o ${OS_ARCH_DIR}/corso $CORSO_BUILD_ARGS
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user