forked from arjungautam1/fullstack-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fa8176
commit d0dabf9
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,42 @@ | ||
// Configuration for docker/bake-action: https://github.com/docker/bake-action | ||
// https://github.com/marketplace/actions/docker-metadata-action#bake-definition | ||
// docker-bake.hcl | ||
|
||
target "docker-metadata-action" {} | ||
|
||
// Create Base Build Target | ||
target "build" { | ||
inherits = ["docker-metadata-action"] | ||
context = "./" | ||
// Use multi-stage Containerfile | ||
dockerfile = "Containerfile.multistage" | ||
} | ||
|
||
// Create Platforms Target | ||
target "platforms" { | ||
// Set target platforms for multi-platform builds https://docs.docker.com/build/bake/reference/#targetplatforms | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64" | ||
] | ||
} | ||
|
||
// Create Multi Platform Build Target | ||
target "multi-platform-build" { | ||
inherits = ["build", "platforms"] | ||
} | ||
|
||
// Create GitHub Action Cache Target | ||
target "gha-cache" { | ||
cache-from = [ | ||
"type=gha" | ||
] | ||
cache-to = [ | ||
"type=gha,mode=max" | ||
] | ||
} | ||
|
||
// Create GitHub Action Build Target | ||
target "gha-build" { | ||
inherits = ["multi-platform-build", "gha-cache"] | ||
} |