From eda2596dca260a22a23cbd74860fda94fe144227 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:01:00 +0100 Subject: [PATCH] ci: use git context Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/ci.yaml | 7 ++++--- docker-bake.hcl | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16435f10..b6fecfc8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,11 +63,12 @@ jobs: password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }} - name: Build - uses: docker/bake-action@v4 + #uses: docker/bake-action@v4 + uses: crazy-max/docker-bake-action@git-context with: + source: "{{defaultContext}}" files: | - ./docker-bake.hcl - ${{ steps.meta.outputs.bake-file }} + cwd://${{ steps.meta.outputs.bake-file }} targets: image-all push: ${{ github.event_name != 'pull_request' }} set: | diff --git a/docker-bake.hcl b/docker-bake.hcl index 02b7515e..9656efd5 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -28,6 +28,7 @@ variable "IMAGE_LOCAL" { target "_common" { args = { + BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1 GO_VERSION = GO_VERSION GIT_REF = GITHUB_REF }