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