1
+ name : Re-build and publish All
2
+ on : [push, workflow_dispatch]
3
+
4
+ env :
5
+ REGISTRY : ghcr.io
6
+
7
+ permissions :
8
+ contents : read
9
+ packages : write
10
+ id-token : write
11
+ attestations : write
12
+
13
+ jobs :
14
+ build-spack :
15
+ runs-on : ubuntu-latest
16
+ strategy :
17
+ matrix :
18
+ os : [{dir: AlmaLinux9,suffix: alma9}]
19
+ env :
20
+ IMAGE_NAME : mucoll-spack
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 0
26
+ - name : Set up Docker buildx
27
+ uses : docker/setup-buildx-action@v3
28
+ - name : Login to container registry
29
+ uses : docker/login-action@v3
30
+ with :
31
+ registry : ${{ env.REGISTRY }}
32
+ username : ${{ github.actor }}
33
+ password : ${{ secrets.GITHUB_TOKEN }}
34
+ - name : Make owner name lowercase
35
+ run : |
36
+ echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
37
+ env :
38
+ OWNER : ' ${{ github.repository_owner }}'
39
+ - name : Extract metadata for Docker
40
+ id : meta
41
+ uses : docker/metadata-action@v5
42
+ with :
43
+ images : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
44
+ - name : Build and Push
45
+ id : docker_build
46
+ uses : docker/build-push-action@v6
47
+ with :
48
+ context : ./${{matrix.os.dir}}
49
+ file : ./${{matrix.os.dir}}/Dockerfile-spack
50
+ push : true
51
+ build-args : |
52
+ VERSION=${{ steps.meta.outputs.version }}
53
+ REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
54
+ tags : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
55
+ labels : ${{ steps.meta.outputs.labels }}
56
+ build-externals :
57
+ runs-on : ubuntu-latest
58
+ needs : build-spack
59
+ strategy :
60
+ matrix :
61
+ os : [{dir: AlmaLinux9,suffix: alma9}]
62
+ env :
63
+ IMAGE_NAME : mucoll-externals
64
+ steps :
65
+ - name : Free Disk Space (Ubuntu)
66
+ uses : endersonmenezes/free-disk-space@v2
67
+ with :
68
+ remove_android : true
69
+ remove_dotnet : true
70
+ remove_haskell : true
71
+ remove_tool_cache : true
72
+ remove_swap : true
73
+ remove_packages : " azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
74
+ remove_packages_one_command : true
75
+ remove_folders : " /usr/share/swift /usr/share/miniconda /usr/share/az* /usr/share/glade* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell"
76
+ testing : false
77
+ - name : Checkout
78
+ uses : actions/checkout@v4
79
+ with :
80
+ fetch-depth : 0
81
+ - name : Set up Docker Buildx
82
+ uses : docker/setup-buildx-action@v3
83
+ - name : Login to DockerHub
84
+ uses : docker/login-action@v3
85
+ with :
86
+ registry : ${{ env.REGISTRY }}
87
+ username : ${{ github.actor }}
88
+ password : ${{ secrets.GITHUB_TOKEN }}
89
+ - name : lowercase owner name
90
+ run : |
91
+ echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
92
+ env :
93
+ OWNER : ' ${{ github.repository_owner }}'
94
+ - name : Docker Meta
95
+ id : meta
96
+ uses : docker/metadata-action@v5
97
+ with :
98
+ images : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
99
+ - name : Build and Push
100
+ id : docker_build
101
+ uses : docker/build-push-action@v6
102
+ with :
103
+ push : true
104
+ context : ./${{matrix.os.dir}}
105
+ file : ./${{matrix.os.dir}}/Dockerfile-externals
106
+ build-args : |
107
+ VERSION=${{ steps.meta.outputs.version }}
108
+ REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
109
+ tags : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
110
+ labels : ${{ steps.meta.outputs.labels }}
111
+ build-sim :
112
+ runs-on : ubuntu-latest
113
+ needs : build-externals
114
+ strategy :
115
+ matrix :
116
+ os : [{dir: AlmaLinux9,suffix: alma9}]
117
+ steps :
118
+ - name : Free Disk Space (Ubuntu)
119
+ uses : endersonmenezes/free-disk-space@v2
120
+ with :
121
+ remove_android : true
122
+ remove_dotnet : true
123
+ remove_haskell : true
124
+ remove_tool_cache : true
125
+ remove_swap : true
126
+ remove_packages : " azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
127
+ remove_packages_one_command : true
128
+ remove_folders : " /usr/share/swift /usr/share/miniconda /usr/share/az* /usr/share/glade* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell"
129
+ testing : false
130
+ - name : Checkout
131
+ uses : actions/checkout@v4
132
+ with :
133
+ fetch-depth : 0
134
+ - name : Set up Docker Buildx
135
+ uses : docker/setup-buildx-action@v3
136
+ - name : Login to DockerHub
137
+ uses : docker/login-action@v3
138
+ with :
139
+ registry : ${{ env.REGISTRY }}
140
+ username : ${{ github.actor }}
141
+ password : ${{ secrets.GITHUB_TOKEN }}
142
+ - name : lowercase owner name
143
+ run : |
144
+ echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
145
+ env :
146
+ OWNER : ' ${{ github.repository_owner }}'
147
+ - name : Docker Meta
148
+ id : meta
149
+ uses : docker/metadata-action@v5
150
+ with :
151
+ images : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
152
+ - name : Build and Push
153
+ id : docker_build
154
+ uses : docker/build-push-action@v6
155
+ with :
156
+ push : true
157
+ context : ./${{matrix.os.dir}}
158
+ file : ./${{matrix.os.dir}}/Dockerfile-sim
159
+ build-args : |
160
+ VERSION=${{ steps.meta.outputs.version }}
161
+ REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
162
+ GITHUB_REPOSITORY=${{ github.repository }}
163
+ MUCOLL_SHA=${{ github.sha }}
164
+ tags : ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-sim:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
0 commit comments