docker release to latest and version tag

This commit is contained in:
f43nd1r 2019-11-21 03:32:11 +01:00
parent ac87019549
commit 34d0759e0d

View file

@ -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