Skip to content

wolf-bubenik triggered module build #27

wolf-bubenik triggered module build

wolf-bubenik triggered module build #27

Workflow file for this run

name: build
run-name: ${{ github.actor }} triggered module build
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Create settings.xml
run: |
mkdir -p ~/.m2
echo "<settings><servers><server><id>magnolia.enterprise</id><username>${{secrets.MGNL_USERNAME}}</username><password>${{secrets.MGNL_PASSWORD}}</password></server><server><id>magnolia.forge.snapshots</id><username>${{secrets.MGNL_USERNAME}}</username><password>${{secrets.MGNL_PASSWORD}}</password></server></servers></settings>" > ~/.m2/settings.xml
- name: Build PR with Maven
if: ${{ github.base_ref == 'main' }}
run: mvn -B clean verify
- name: Build and Deploy main branch with Maven
if: ${{ github.base_ref == null }}
run: mvn -B clean deploy