Skip to content

Commit

Permalink
Merge pull request #56 from mozzy11/master
Browse files Browse the repository at this point in the history
Add CI to deploy to UW DIGI maven repo
  • Loading branch information
mozzy11 authored Nov 21, 2024
2 parents e3da001 + 2d407c2 commit a007217
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Deploy

on:
push:
branches: [ main ]
release:
types: [ created ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 8.0.232
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test
run: mvn --batch-mode --update-snapshots clean package -DskipTests

- name: Set settings.xml
uses: s4u/maven-settings-action@v2.6.0
with:
servers: |
[{
"id": "uwdigi-repo-central",
"username": "${{ secrets.MAVEN_REPO_USERNAME }}",
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}"
},
{
"id": "uwdigi-repo-snapshots",
"username": "${{ secrets.MAVEN_REPO_USERNAME }}",
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}"
}]
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }}

- name: Deploy
run: mvn --batch-mode clean deploy -DskipTests
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Lab Integration Module
==========================
[![CI](https://github.com/IsantePlus/openmrs-module-labintegration/actions/workflows/ci.yml/badge.svg)](https://github.com/IsantePlus/openmrs-module-labintegration/actions/workflows/ci.yml)

[![Deploy](https://github.com/IsantePlus/openmrs-module-labintegration/actions/workflows/deploy.yml/badge.svg)](https://github.com/IsantePlus/openmrs-module-labintegration/actions/workflows/deploy.yml)

Description
-----------
This is a very basic module which can be used as a starting point in creating a new module.
Expand Down
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,24 @@
<layout>default</layout>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>uwdigi-repo-central</id>
<name>DIGI Public Repository</name>
<url>https://packages.uwdigi.org/artifactory/public</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>uwdigi-repo-central</id>
<name>libs-release</name>
<url>https://packages.uwdigi.org/artifactory/libs-release</url>
</repository>
<snapshotRepository>
<id>uwdigi-repo-snapshots</id>
<name>libs-snapshot</name>
<url>https://packages.uwdigi.org/artifactory/libs-snapshot</url>
</snapshotRepository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<id>openmrs-repo</id>
Expand Down

0 comments on commit a007217

Please sign in to comment.