Skip to content

Commit 7a1d050

Browse files
committed
refactor: update Docker bake configuration and remove obsolete CI workflow
1 parent 493c89d commit 7a1d050

File tree

3 files changed

+39
-148
lines changed

3 files changed

+39
-148
lines changed

.github/workflows/ci-bake.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
env:
4545
github_token: ${{ secrets.GITHUB_TOKEN }}
4646
with:
47-
files: ./ci/nestjs-project/docker-bake.hcl
47+
files: ./ci/docker-bake.hcl
4848
push: false
4949
load: true
5050
targets: ci
@@ -69,7 +69,7 @@ jobs:
6969
load: true
7070
targets: prod
7171
files: |
72-
./ci/nestjs-project/docker-bake.hcl
72+
./ci/docker-bake.hcl
7373
cwd://${{ steps.meta.outputs.bake-file }}
7474
set: |
7575
prod.cache-from=type=gha
@@ -128,7 +128,7 @@ jobs:
128128
sbom: true
129129
targets: prod
130130
files: |
131-
./ci/nestjs-project/docker-bake.hcl
131+
./ci/docker-bake.hcl
132132
cwd://${{ steps.meta.outputs.bake-file }}
133133
set: |
134134
prod.cache-from=type=gha

.github/workflows/ci.yaml

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/ci/docker-bake.hcl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
variable "IMAGE_NAME" {
3+
default = "argentinaluiz/docker-prod-test"
4+
}
5+
6+
target "docker-metadata-action" {}
7+
8+
9+
group "default" {
10+
targets = [ "prod" ]
11+
}
12+
13+
target "prod" {
14+
inherits = ["docker-metadata-action"]
15+
context = "./nestjs-project"
16+
dockerfile = "./Dockerfile.prod"
17+
secret = [
18+
{
19+
type = "env"
20+
id = "github_token"
21+
}
22+
]
23+
}
24+
25+
target "ci" {
26+
context = "./nestjs-project"
27+
dockerfile = "./Dockerfile.prod"
28+
tags = [ "${IMAGE_NAME}:ci" ]
29+
target = "ci"
30+
secret = [
31+
{
32+
type = "env"
33+
id = "github_token"
34+
}
35+
]
36+
}

0 commit comments

Comments
 (0)