Skip to content

Commit 834f6eb

Browse files
committed
GHA updates.
1 parent ba6db31 commit 834f6eb

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ jobs:
3333
with:
3434
images: cogstacksystems/jupyter-hub
3535
tags: |
36+
37+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
3638
type=semver,pattern={{version}},prefix=v
3739
type=semver,pattern={{major}}.{{minor}},prefix=v
40+
# latest on main AND on v-tags
3841
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
42+
# branches (non-PR)
3943
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
44+
# short sha
4045
type=sha,format=short
4146
4247
- name: Docker meta (singleuser)
@@ -45,12 +50,17 @@ jobs:
4550
with:
4651
images: cogstacksystems/jupyter-singleuser
4752
tags: |
53+
54+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
4855
type=semver,pattern={{version}},prefix=v
4956
type=semver,pattern={{major}}.{{minor}},prefix=v
57+
# latest on main AND on v-tags
5058
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
59+
# branches (non-PR)
5160
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
61+
# short sha
5262
type=sha,format=short
53-
63+
5464
- uses: docker/login-action@v3
5565
with:
5666
username: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -110,22 +120,32 @@ jobs:
110120
with:
111121
images: cogstacksystems/jupyter-hub
112122
tags: |
123+
124+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
113125
type=semver,pattern={{version}},prefix=v
114126
type=semver,pattern={{major}}.{{minor}},prefix=v
127+
# latest on main AND on v-tags
115128
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
129+
# branches (non-PR)
116130
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
131+
# short sha
117132
type=sha,format=short
118-
133+
119134
- name: Docker meta (singleuser)
120135
id: meta_su
121136
uses: docker/metadata-action@v5
122137
with:
123138
images: cogstacksystems/jupyter-singleuser
124139
tags: |
140+
141+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
125142
type=semver,pattern={{version}},prefix=v
126143
type=semver,pattern={{major}}.{{minor}},prefix=v
144+
# latest on main AND on v-tags
127145
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
146+
# branches (non-PR)
128147
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
148+
# short sha
129149
type=sha,format=short
130150
131151
- uses: docker/login-action@v3
@@ -183,11 +203,17 @@ jobs:
183203
with:
184204
images: cogstacksystems/jupyter-singleuser-gpu
185205
tags: |
206+
207+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
186208
type=semver,pattern={{version}},prefix=v
187209
type=semver,pattern={{major}}.{{minor}},prefix=v
210+
# latest on main AND on v-tags
188211
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
212+
# branches (non-PR)
189213
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
214+
# short sha
190215
type=sha,format=short
216+
191217
- uses: docker/login-action@v3
192218
with:
193219
username: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -226,10 +252,15 @@ jobs:
226252
with:
227253
images: cogstacksystems/jupyter-hub
228254
tags: |
255+
256+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
229257
type=semver,pattern={{version}},prefix=v
230258
type=semver,pattern={{major}}.{{minor}},prefix=v
259+
# latest on main AND on v-tags
231260
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
261+
# branches (non-PR)
232262
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
263+
# short sha
233264
type=sha,format=short
234265
235266
- name: Docker meta (singleuser)
@@ -238,10 +269,15 @@ jobs:
238269
with:
239270
images: cogstacksystems/jupyter-singleuser
240271
tags: |
272+
273+
# vX.Y.Z -> X.Y.Z and X.Y (strip "v")
241274
type=semver,pattern={{version}},prefix=v
242275
type=semver,pattern={{major}}.{{minor}},prefix=v
276+
# latest on main AND on v-tags
243277
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
278+
# branches (non-PR)
244279
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
280+
# short sha
245281
type=sha,format=short
246282
247283
- name: Create hub multi-arch manifests

0 commit comments

Comments
 (0)