Acrarium/.github/workflows/release-docker.yml
2019-11-21 03:32:11 +01:00

36 lines
No EOL
1.1 KiB
YAML

name: release-docker
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '1.13'
- name: Build release
run: ./mvnw -B clean package -Pproduction
- 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: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