@@ -2,20 +2,7 @@ name: Docker Build and Publish
22
33on :
44 push :
5- branches : [ "master" ]
65 tags : [ 'v*.*.*' ]
7- paths :
8- - ' **.py'
9- - ' **/Dockerfile*'
10- - ' **/docker-compose*.yml'
11- - ' requirements*.txt'
12- pull_request :
13- branches : [ "master" ]
14- paths :
15- - ' **.py'
16- - ' **/Dockerfile*'
17- - ' **/docker-compose*.yml'
18- - ' requirements*.txt'
196 # Allow manual trigger from GitHub UI
207 workflow_dispatch :
218
3522 uses : actions/checkout@v4
3623
3724 - name : Log in to the Container registry
38- if : github.event_name != 'pull_request'
3925 uses : docker/login-action@v3
4026 with :
4127 registry : ${{ env.REGISTRY }}
4935 with :
5036 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5137 tags : |
52- type=raw,value=latest
53- type=ref,event=branch
54- type=ref,event=pr
5538 type=semver,pattern={{version}}
5639 type=semver,pattern={{major}}.{{minor}}
5740 type=semver,pattern={{major}}
58- type=sha
5941
6042 # Extract metadata for CPU image
6143 - name : Extract metadata (tags, labels) for CPU Docker
@@ -66,21 +48,17 @@ jobs:
6648 flavor : |
6749 suffix=-cpu
6850 tags : |
69- type=raw,value=latest
70- type=ref,event=branch
71- type=ref,event=pr
7251 type=semver,pattern={{version}}
7352 type=semver,pattern={{major}}.{{minor}}
7453 type=semver,pattern={{major}}
75- type=sha
7654
7755 # Build and push GPU version
7856 - name : Build and push GPU Docker image
7957 uses : docker/build-push-action@v5
8058 with :
8159 context : .
8260 file : ./Dockerfile
83- push : ${{ github.event_name != 'pull_request' }}
61+ push : true
8462 tags : ${{ steps.meta-gpu.outputs.tags }}
8563 labels : ${{ steps.meta-gpu.outputs.labels }}
8664 platforms : linux/amd64
9169 with :
9270 context : .
9371 file : ./Dockerfile.cpu
94- push : ${{ github.event_name != 'pull_request' }}
72+ push : true
9573 tags : ${{ steps.meta-cpu.outputs.tags }}
9674 labels : ${{ steps.meta-cpu.outputs.labels }}
9775 platforms : linux/amd64
@@ -105,21 +83,17 @@ jobs:
10583 flavor : |
10684 suffix=-ui
10785 tags : |
108- type=raw,value=latest
109- type=ref,event=branch
110- type=ref,event=pr
11186 type=semver,pattern={{version}}
11287 type=semver,pattern={{major}}.{{minor}}
11388 type=semver,pattern={{major}}
114- type=sha
11589
11690 # Build and push UI version
11791 - name : Build and push UI Docker image
11892 uses : docker/build-push-action@v5
11993 with :
12094 context : ./ui
12195 file : ./ui/Dockerfile
122- push : ${{ github.event_name != 'pull_request' }}
96+ push : true
12397 tags : ${{ steps.meta-ui.outputs.tags }}
12498 labels : ${{ steps.meta-ui.outputs.labels }}
12599 platforms : linux/amd64
0 commit comments