Skip to content

Fix small error in github action #75

Fix small error in github action

Fix small error in github action #75

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# 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" ]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: 'root'
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
include:
- OPENMRS_VERSION: 2.0.1
PROFILE: ''
FILE_SUFFIX: 2_0
- OPENMRS_VERSION: 2.1.0
PROFILE: ''
FILE_SUFFIX: 2_1
- OPENMRS_VERSION: 2.2.0
PROFILE: ''
FILE_SUFFIX: 2_2
- OPENMRS_VERSION: 2.3.0
PROFILE: ''
FILE_SUFFIX: 2_3
- OPENMRS_VERSION: 2.4.5
PROFILE: ''
FILE_SUFFIX: 2_4
TWO_STEP: 'true'
- OPENMRS_VERSION: 2.5.5
PROFILE: ''
FILE_SUFFIX: 2_5
TWO_STEP: 'true'
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: bash upgrade_mvp.sh
env:
OPENMRS_VERSION: ${{ matrix.OPENMRS_VERSION }}
PROFILE: ${{ matrix.PROFILE }}
FILE_SUFFIX: ${{ matrix.FILE_SUFFIX }}
TWO_STEP: ${{ matrix.TWO_STEP }}
- name: Archive build artifacts locally
run: |
mkdir -p ../artifacts
mv openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip ../artifacts/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download all artifacts from build jobs
run: |
mkdir artifacts
cp build/**/artifacts/*.zip ./artifacts/
- name: Merge all zip files into a single exports.zip
run: |
cd artifacts
zip ../exports.zip ./*.zip
- name: Clean up temporary artifacts
run: |
rm -rf ./artifacts
- name: Upload final merged artifact
uses: actions/upload-artifact@v4
with:
name: exports.zip
path: exports.zip