Skip to content

Build Project

Build Project #21

Workflow file for this run

name: Build Project
on:
push:
branches-ignore:
- 'dependabot/**'
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
UpgradeTests:
name: Upgrades
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project: [ javabot, morphia ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
server-id: central
cache: maven
- name: Install maven
uses: sfesenko/setup-sdkman@v1
# if: ${{ env.ACT == 'true' }}
with:
deps: maven:4.0.0-rc-2
- name: Checkout ${{ matrix.project }} repository
working-directory: projects/${{ matrix.project }}
run: |
git clone $( cat git ) git_repo
# - name: Custom build file name
# id: custom
# run: echo "file=projects/${{ matrix.project }}/build.sh" >> $GITHUB_OUTPUT
- name: ${{ matrix.project }} Initial build
working-directory: projects/${{ matrix.project }}
run: "[ -e build.sh ] && ./build.sh || ../../build.sh"
- name: Apply upgrades
working-directory: projects/${{ matrix.project }}/git_repo
run: |
mvn -e -U \
-DskipMavenParsing=true \
org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=dev.morphia.morphia:rewrite:3.0.0-SNAPSHOT \
-Drewrite.activeRecipes=dev.morphia.UpgradeToMorphia30
- name: ${{ matrix.project }} Post-upgrade build
working-directory: projects/${{ matrix.project }}
run: "[ -e build.sh ] && ./build.sh || ../../build.sh"