1
1
name : image
2
2
3
- on :
3
+ on : # yamllint disable-line rule:truthy
4
4
workflow_call :
5
5
inputs :
6
6
imageTag :
7
- default : ' latest'
7
+ default : latest
8
8
type : string
9
9
pushImage :
10
10
default : true
@@ -22,55 +22,55 @@ jobs:
22
22
fail-fast : false
23
23
matrix :
24
24
include :
25
- - IMAGE_NAME : kepler
26
- IMAGE_FILE : build/Dockerfile
27
- PLATFORMS : linux/amd64,linux/arm64
28
- BUILD_ARGS : |
29
- INSTALL_DCGM=false
30
- INSTALL_HABANA=false
31
- VERSION=${{ inputs.imageTag }}
32
- LABEL : ${{ inputs.imageTag }}
33
- - IMAGE_NAME : kepler
34
- IMAGE_FILE : build/Dockerfile
35
- PLATFORMS : linux/amd64
36
- BUILD_ARGS : |
37
- INSTALL_DCGM=true
38
- INSTALL_HABANA=false
39
- VERSION=${{ inputs.imageTag }}-dcgm
40
- LABEL : ${{ inputs.imageTag }}-dcgm
41
- - IMAGE_NAME : kepler
42
- IMAGE_FILE : build/Dockerfile
43
- PLATFORMS : linux/amd64
44
- BUILD_ARGS : |
45
- INSTALL_DCGM=false
46
- INSTALL_HABANA=true
47
- VERSION=${{ inputs.imageTag }}-habana
48
- LABEL : ${{ inputs.imageTag }}-habana
49
- - IMAGE_NAME : kepler-validator
50
- IMAGE_FILE : build/Dockerfile.kepler-validator
51
- BUILD_ARGS : " "
52
- PLATFORMS : linux/amd64
53
- LABEL : ${{ inputs.imageTag }}
25
+ - IMAGE_NAME : kepler
26
+ IMAGE_FILE : build/Dockerfile
27
+ PLATFORMS : linux/amd64,linux/arm64
28
+ BUILD_ARGS : |
29
+ INSTALL_DCGM=false
30
+ INSTALL_HABANA=false
31
+ VERSION=${{ inputs.imageTag }}
32
+ LABEL : ${{ inputs.imageTag }}
33
+ - IMAGE_NAME : kepler
34
+ IMAGE_FILE : build/Dockerfile
35
+ PLATFORMS : linux/amd64
36
+ BUILD_ARGS : |
37
+ INSTALL_DCGM=true
38
+ INSTALL_HABANA=false
39
+ VERSION=${{ inputs.imageTag }}-dcgm
40
+ LABEL : ${{ inputs.imageTag }}-dcgm
41
+ - IMAGE_NAME : kepler
42
+ IMAGE_FILE : build/Dockerfile
43
+ PLATFORMS : linux/amd64
44
+ BUILD_ARGS : |
45
+ INSTALL_DCGM=false
46
+ INSTALL_HABANA=true
47
+ VERSION=${{ inputs.imageTag }}-habana
48
+ LABEL : ${{ inputs.imageTag }}-habana
49
+ - IMAGE_NAME : kepler-validator
50
+ IMAGE_FILE : build/Dockerfile.kepler-validator
51
+ BUILD_ARGS : " "
52
+ PLATFORMS : linux/amd64
53
+ LABEL : ${{ inputs.imageTag }}
54
54
steps :
55
- - name : Checkout
56
-
57
- - name : Set up QEMU
58
- uses : docker/setup-qemu-action@v3
59
- with :
60
- image : tonistiigi/binfmt:qemu-v8.1.5
61
- - name : Set up Docker Buildx
62
- uses : docker/setup-buildx-action@v3
63
- - name : Login to Quay
64
- if : ${{ inputs.pushImage }}
65
- uses : docker/login-action@v3
66
- with :
67
- registry : quay.io/sustainable_computing_io
68
- username : ${{ secrets.username }}
69
- password : ${{ secrets.password }}
55
+ - name : Checkout
56
+
57
+ - name : Set up QEMU
58
+ uses : docker/setup-qemu-action@v3
59
+ with :
60
+ image : tonistiigi/binfmt:qemu-v8.1.5
61
+ - name : Set up Docker Buildx
62
+ uses : docker/setup-buildx-action@v3
63
+ - name : Login to Quay
64
+ if : ${{ inputs.pushImage }}
65
+ uses : docker/login-action@v3
66
+ with :
67
+ registry : quay.io/sustainable_computing_io
68
+ username : ${{ secrets.username }}
69
+ password : ${{ secrets.password }}
70
70
71
- - name : Build and push image
72
- uses : docker/build-push-action@v5
73
- with :
71
+ - name : Build and push image
72
+ uses : docker/build-push-action@v5
73
+ with :
74
74
context : .
75
75
platforms : ${{matrix.PLATFORMS}}
76
76
push : ${{ inputs.pushImage }}
@@ -79,17 +79,17 @@ jobs:
79
79
labels : ${{matrix.LABEL}}
80
80
file : ${{matrix.IMAGE_FILE}}
81
81
82
- - name : Generate SBOM
83
-
84
- with :
85
- image : quay.io/sustainable_computing_io/${{matrix.IMAGE_NAME}}:${{matrix.LABEL}}
86
- artifact-name : sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.json
87
- output-file : ./sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.spdx.json
82
+ - name : Generate SBOM
83
+
84
+ with :
85
+ image : quay.io/sustainable_computing_io/${{matrix.IMAGE_NAME}}:${{matrix.LABEL}}
86
+ artifact-name : sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.json
87
+ output-file : ./sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.spdx.json
88
88
89
- - name : save Kepler image SBOM as artifact
90
- if : ${{ inputs.pushImage }}
91
-
92
- with :
89
+ - name : save Kepler image SBOM as artifact
90
+ if : ${{ inputs.pushImage }}
91
+
92
+ with :
93
93
name : sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.spdx.json
94
94
path : ./sbom-${{matrix.IMAGE_NAME}}-${{matrix.LABEL}}.spdx.json
95
95
retention-days : 1
0 commit comments