Merge pull request #81 from lifs-tools/renovate/org.apache.maven.plug… #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
push: | |
branches: [ master, release-2.0.0 ] | |
pull_request: | |
branches: [ master, release-2.0.0 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: 'lifs/lifs-goslin-webapp' | |
REGISTRY_NAME: 'docker.lifs-tools.org' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: 'true' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Set Git user | |
run: | | |
git config --global committer.email "[email protected]" | |
git config --global committer.name "GitHub" | |
git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git config --global author.name "${GITHUB_ACTOR}" | |
- name: Setup Maven settings.xml | |
uses: whelk-io/maven-settings-xml-action@v21 | |
with: | |
servers: '[{ "id": "artifactory-releases", "username": "github-deployer", "password": "${env.ARTIFACTORY_TOKEN_REF}" }, { "id": "lifs-new-central", "username": "github-deployer", "password": "${env.ARTIFACTORY_TOKEN_REF}" }, { "id": "artifactory-snapshots", "username": "github-deployer", "password": "${env.ARTIFACTORY_TOKEN_REF}" }]' | |
- name: Set Release version env variable | |
env: | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
- name: Login to LIFS Tools registry | |
uses: docker/login-action@v2 | |
with: | |
registry: docker.lifs-tools.org | |
username: ${{ secrets.LIFS_TOOLS_DOCKER_REGISTRY_USER }} | |
password: ${{ secrets.LIFS_TOOLS_DOCKER_REGISTRY_PW }} | |
- name: Build with Maven | |
env: | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
ARTIFACTORY_TOKEN_REF: ${{ secrets.ARTIFACTORY_NEW_TOKEN }} | |
run: ./mvnw -B deploy -Pdocker --file pom.xml |