generated from Nixius/template
feat: optimize builds with Docker Buildx and Bake
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
0103cc87e4
commit
b95b44d1d9
|
|
@ -146,4 +146,25 @@ steps:
|
||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
event: [push, cron]
|
event: [push, cron]
|
||||||
|
status: success
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: docker:24.0.7
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git
|
||||||
|
- docker buildx create --use
|
||||||
|
- docker buildx bake --file docker-bake.hcl --set *.platform=linux/amd64 --push
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
image: docker:24.0.7
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git
|
||||||
|
- docker stack deploy --with-registry-auth -c ./stack.staging.yml ${CI_REPO_NAME}-staging
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: main
|
||||||
status: success
|
status: success
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
variable "REGISTRY" {
|
||||||
|
default = "git.nixc.us/colin"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "TAG" {
|
||||||
|
default = "latest"
|
||||||
|
}
|
||||||
|
|
||||||
|
group "default" {
|
||||||
|
targets = ["staging", "production"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "staging" {
|
||||||
|
context = "."
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
tags = ["${REGISTRY}/n8n:staging"]
|
||||||
|
platforms = ["linux/amd64"]
|
||||||
|
cache-from = ["type=registry,ref=${REGISTRY}/n8n:cache"]
|
||||||
|
cache-to = ["type=registry,ref=${REGISTRY}/n8n:cache"]
|
||||||
|
args = {
|
||||||
|
NODE_ENV = "production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
target "production" {
|
||||||
|
context = "."
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
tags = ["${REGISTRY}/n8n:production"]
|
||||||
|
platforms = ["linux/amd64"]
|
||||||
|
cache-from = ["type=registry,ref=${REGISTRY}/n8n:cache"]
|
||||||
|
cache-to = ["type=registry,ref=${REGISTRY}/n8n:cache"]
|
||||||
|
args = {
|
||||||
|
NODE_ENV = "production"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue