problem: tags all docker releases with latest
This commit is contained in:
2
.github/workflows/publish.yaml
vendored
2
.github/workflows/publish.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Upload to Docker
|
- name: Upload to Docker
|
||||||
uses: eskatos/gradle-command-action@v1
|
uses: eskatos/gradle-command-action@v1
|
||||||
with:
|
with:
|
||||||
arguments: jib -Platest=true
|
arguments: jib
|
||||||
env:
|
env:
|
||||||
DOCKER_KEY: ${{ secrets.DOCKER_KEY }}
|
DOCKER_KEY: ${{ secrets.DOCKER_KEY }}
|
||||||
|
|
||||||
|
|||||||
15
build.gradle
15
build.gradle
@@ -142,17 +142,22 @@ jib {
|
|||||||
from {
|
from {
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
// execute with -Platest=true
|
// by default publish as:
|
||||||
// $ gradle jib -Platest=true
|
// dshackle:shapshot,
|
||||||
|
// dshackle:t<yyyyMMddHHmm>,
|
||||||
|
// dshackle:<versionFull> and
|
||||||
|
// dshackle:<versionMajor.versionMinor>
|
||||||
|
// dshackle:latest only when publishing first version with zero patch (ex. 1.2.0)
|
||||||
image = [
|
image = [
|
||||||
project.hasProperty('docker') ? project.property('docker') : 'emeraldpay',
|
project.hasProperty('docker') ? project.property('docker') : 'emeraldpay',
|
||||||
'/dshackle:',
|
'/dshackle:',
|
||||||
(project.hasProperty('latest') && project.property('latest') == 'true') ? 'latest' : 'snapshot'
|
'snapshot'
|
||||||
].join('')
|
].join('')
|
||||||
tags = [project.version].with (true) {
|
tags = [project.version].with (true) {
|
||||||
if (!project.hasProperty('latest') || project.property('latest') != 'true') {
|
if (project.version.toString().endsWith(".0")) {
|
||||||
add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
|
add "latest"
|
||||||
}
|
}
|
||||||
|
add "t"+ DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
|
||||||
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
|
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
|
||||||
}
|
}
|
||||||
auth {
|
auth {
|
||||||
|
|||||||
Reference in New Issue
Block a user