From 34d0759e0db492a24cfcf96deac7d818ebbb4a2b Mon Sep 17 00:00:00 2001 From: f43nd1r Date: Thu, 21 Nov 2019 03:32:11 +0100 Subject: [PATCH] docker release to latest and version tag --- .github/workflows/release-docker.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index 4bc8af1..ec956ab 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -17,12 +17,20 @@ jobs: java-version: '1.13' - name: Build release run: ./mvnw -B clean package -Pproduction - - name: Build image - run: ./mvnw -B dockerfile:build -Pproduction -pl acrarium - - name: Publish to hub + - name: Extract version + id: version + run: echo ::set-output name=value::$(./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep '^[0-9]') + - name: Publish to hub (latest) uses: elgohr/Publish-Docker-Github-Action@master with: - name: f43nd1r/acrarium + name: f43nd1r/acrarium:latest username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} workdir: acrarium + - name: Publish to hub (version tag) + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: f43nd1r/acrarium:${{ steps.version.outputs.value }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: acrarium \ No newline at end of file