You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/11/08 16:17:13 UTC
[isis-app-helloworld] 01/02: build and push Docker image
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis-app-helloworld.git
commit 36cdd716174d1b8ad47ee30dd47b223621e517a6
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Nov 8 16:07:33 2020 +0000
build and push Docker image
---
.github/workflows/mavenJdk8.yml | 8 +++++++-
pom.xml | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/mavenJdk8.yml b/.github/workflows/mavenJdk8.yml
index 3c60960..5fd4a63 100644
--- a/.github/workflows/mavenJdk8.yml
+++ b/.github/workflows/mavenJdk8.yml
@@ -42,7 +42,7 @@ jobs:
run: |
BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
- REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
+ export REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
mvn versions:set -DnewVersion=$REVISION
- name: Print pom.xml
@@ -54,3 +54,9 @@ jobs:
shell: bash
run: |
mvn install
+ mvn -Ddocker jib:build
+
+ - name: Build and Push Docker Image
+ shell: bash
+ run: |
+ mvn -Ddocker jib:build
diff --git a/pom.xml b/pom.xml
index bfeac9c..f1c505c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,7 +108,7 @@
<workingDirectory>/run/secrets</workingDirectory>
</container>
<to>
- <image>docker.io/apacheisis/helloworld:latest</image>
+ <image>docker.io/apacheisis/helloworld:${env.REVISION}</image>
<auth>
<username>${env.DOCKER_REGISTRY_USERNAME}</username>
<password>${env.DOCKER_REGISTRY_PASSWORD}</password>