File tree 2 files changed +24
-5
lines changed
2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Release Docker
2
2
on :
3
3
push :
4
+ branches :
5
+ - main
4
6
tags : ["*"]
5
7
jobs :
6
8
publish :
Original file line number Diff line number Diff line change @@ -272,11 +272,28 @@ lazy val cli = project
272
272
propsFile :: copiedJars.toList
273
273
}
274
274
.taskValue,
275
- docker / imageNames :=
276
- List (
277
- ImageName (" sourcegraph/scip-java:latest" ),
278
- ImageName (s " sourcegraph/scip-java: ${version.value}" )
279
- ),
275
+ docker / imageNames := {
276
+ val latest = {
277
+ val label =
278
+ if (isSnapshot.value)
279
+ " latest-snapshot"
280
+ else
281
+ " latest"
282
+
283
+ List (ImageName (s " sourcegraph/scip-java: $label" ))
284
+ }
285
+
286
+ // Don't publish a separately tagged image for snapshots -
287
+ // only latest-snapshot
288
+ val versioned =
289
+ if (isSnapshot.value)
290
+ Nil
291
+ else
292
+ List (ImageName (s " sourcegraph/scip-java: ${version.value}" ))
293
+
294
+ latest ++ versioned
295
+
296
+ },
280
297
docker / dockerfile := {
281
298
val binaryDistribution = pack.value
282
299
val scipJavaWrapper = (ThisBuild / baseDirectory).value / " bin" /
You can’t perform that action at this time.
0 commit comments