Skip to content

Commit

Permalink
Merge pull request #282 from crazy-max/update-git-keep-dir
Browse files Browse the repository at this point in the history
chore: put context keep dir within the bake definition
  • Loading branch information
crazy-max authored Jan 8, 2025
2 parents 309da7d + bf35764 commit 77f4fc9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ jobs:
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
set: |
*.args.BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
13 changes: 13 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}

group "default" {
targets = ["build"]
}
Expand All @@ -11,42 +17,49 @@ group "validate" {
}

target "build" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-update"
output = ["."]
}

target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-validate"
output = ["type=cacheonly"]
}

target "format" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "format-update"
output = ["."]
}

target "lint" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "lint"
output = ["type=cacheonly"]
}

target "vendor" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-update"
output = ["."]
}

target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-validate"
output = ["type=cacheonly"]
}

target "test" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "test-coverage"
output = ["./coverage"]
Expand Down

0 comments on commit 77f4fc9

Please sign in to comment.