File tree Expand file tree Collapse file tree 2 files changed +9
-24
lines changed
Expand file tree Collapse file tree 2 files changed +9
-24
lines changed Original file line number Diff line number Diff line change 11name : Build & Push (GHCR)
22
33on :
4+ workflow_dispatch : {}
45 push :
5- branches : [ main ]
6+ branches : [" main" ]
67 paths :
78 - " server/**"
89 - " client/**"
910 - " pyworker/**"
10- - " nginx/**"
1111 - " docker-bake.hcl"
1212 - " .github/workflows/build.yml"
1313
2727 - name : Setup Buildx
2828 uses : docker/setup-buildx-action@v3
2929
30- # Build & push : latest when building main
30+ # latest for main
3131 - name : Build & Push :latest (main only)
3232 if : github.ref == 'refs/heads/main'
3333 env :
@@ -36,11 +36,11 @@ jobs:
3636 run : |
3737 docker buildx bake -f docker-bake.hcl --push
3838
39- # Build & push :< short-sha> on every run
39+ # short SHA every run (handy for rollbacks)
4040 - name : Build & Push :short-sha
4141 env :
4242 REGISTRY : ghcr.io/cornellev
4343 TAG : ${{ github.sha }}
4444 run : |
45- SHORT="${TAG::7}" # <-- bash slicing, not GHA substr()
46- REGISTRY="$REGISTRY" TAG="$SHORT" docker buildx bake -f docker-bake.hcl --push
45+ SHORT="${TAG::7}"
46+ REGISTRY="$REGISTRY" TAG="$SHORT" docker buildx bake -f docker-bake.hcl --push
Original file line number Diff line number Diff line change 1- variable "REGISTRY" {
2- default = " ghcr.io/cornellev"
3- }
4-
5- variable "TAG" {
6- default = " latest"
7- }
1+ variable "REGISTRY" { default = " ghcr.io/cornellev" }
2+ variable "TAG" { default = " latest" }
83
94group "default" {
10- targets = [" nginx" , " server" , " client" , " worker" ]
11- }
12-
13- target "nginx" {
14- context = " ./nginx"
15- tags = [" ${ REGISTRY } /viz-nginx:${ TAG } " ]
16- platforms = [" linux/amd64" ]
17- labels = {
18- " org.opencontainers.image.source" = " https://github.com/cornellev/VisualizationToolbox"
19- }
20- push = true
5+ targets = [" server" , " client" , " worker" ]
216}
227
238target "server" {
You can’t perform that action at this time.
0 commit comments