Update Mifos Github Actions workflows #282
This file contains hidden or 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
| name: Publish Fineract to Mifos Docker Hub | |
| on: | |
| push: | |
| branches: | |
| - develop-mifos | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| - name: Cache Gradle dependencies | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| - name: Setup Gradle and Validate Wrapper | |
| uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2 | |
| with: | |
| validate-wrappers: true | |
| - name: Build Avro Java SDK | |
| run: ./gradlew --no-daemon :fineract-avro-schemas:buildJavaSdk -x test -x cucumber -x doc -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Compile Fineract Provider | |
| run: ./gradlew --no-daemon :fineract-provider:compileJava -x test -x cucumber -x doc -x buildJavaSdk -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Generate Fineract Git Properties | |
| run: ./gradlew --no-daemon :fineract-provider:generateGitProperties -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Verify generated git.properties | |
| run: test -f fineract-provider/build/generated-resources/git/git.properties | |
| - name: Build Fineract Client Java SDK | |
| run: ./gradlew --no-daemon :fineract-client:buildJavaSdk -x test -x cucumber -x doc -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Build Fineract Client Feign Java SDK | |
| run: ./gradlew --no-daemon :fineract-client-feign:buildJavaSdk -x test -x cucumber -x doc -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Build Fineract | |
| run: ./gradlew --no-daemon build -x test -x cucumber -x doc -x javadoc -x javadocJar -x checkstyleMain -x checkstyleTest -x checkstyleJmh -x spotbugsMain -x spotbugsTest -x spotlessCheck -x spotlessApply -x rat | |
| - name: Build with Gradle | |
| env: | |
| JIB_USERNAME: ${{secrets.DOCKER_USERNAME}} | |
| JIB_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
| run: ./gradlew --no-daemon :fineract-provider:clean -Djib.to.image=openmf/fineract:latest -Djib.to.auth.username=$JIB_USERNAME -Djib.to.auth.password=$JIB_PASSWORD :fineract-provider:jib -x test | |
| # TODO: @vidakovic Github CodeQL code scans need to be enabled for this repository; this is a paid service; discuss with community | |
| #- uses: anchore/scan-action@v2 | |
| # id: scan | |
| # with: | |
| # image: "openmf/fineract:latest" | |
| # acs-report-enable: true | |
| #- name: upload Anchore scan SARIF report | |
| # uses: github/codeql-action/upload-sarif@v2 | |
| # with: | |
| # sarif_file: ${{ steps.scan.outputs.sarif }} | |
| # category: docker |