Skip to content

Commit

Permalink
ci: modify kgw build with workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaiba committed Oct 16, 2024
1 parent a11fe98 commit 7529820
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/kgw-test-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,28 +110,31 @@ jobs:
# always uses the latest version of kwil-db/core
run: |
kdbDir=$(pwd)
echo "current dir: " $kdbDir
cd ..
rm -rf ./kgw
git config --global url."https://${GH_ACCESS_TOKEN}:x-oauth-basic@github.com/kwilteam/".insteadOf "https://github.com/kwilteam/"
rm -rf /tmp/kgw
git clone -b ${{ inputs.kgw-ref }} https://github.com/kwilteam/kgw.git /tmp/kgw
git clone -b ${{ inputs.kgw-ref }} https://github.com/kwilteam/kgw.git ./kgw
rm -rf ~/.gitconfig
cd /tmp/kgw
cd ./kgw
if [[ ${{ inputs.kgw-ref }} == release-* ]]; then
go mod vendor
else
# non release branch, use go workspace to always use the latest version of kwil-db/core
go work init . $kdbDir/core
test -f go.work || go work init . ../kwil-db/core
go work vendor
fi
cd -
cd $kdbDir
- name: Build kgw image
id: docker_build_kgw
uses: docker/build-push-action@v5
with:
context: /tmp/kgw
context: $(pwd)/..
load: true
builder: ${{ steps.buildx.outputs.name }}
file: /tmp/kgw/Dockerfile
file: $(pwd)/../kgw/Dockerfile.workspace
push: false
tags: kgw:latest
cache-from: type=local,src=/tmp/.buildx-cache-kgw
Expand Down

0 comments on commit 7529820

Please sign in to comment.