Skip to content

Commit

Permalink
Merge pull request #57 from mozzy11/master
Browse files Browse the repository at this point in the history
update CI
  • Loading branch information
mozzy11 authored Nov 21, 2024
2 parents a007217 + 7cc847a commit f632bb9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 70 deletions.
63 changes: 44 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Build and Deploy

# Controls when the action will run.
on:
Expand Down Expand Up @@ -39,25 +39,50 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: s4u/maven-settings-action@v2.2.0

- name: Build and Test
run: mvn --batch-mode --update-snapshots clean package

- name: Set settings.xml
uses: s4u/maven-settings-action@v2.6.0
with:
servers: |
[{
"id": "github-packages",
"username": "${{ secrets.RELEASE_USERNAME }}",
"password": "${{ secrets.RELEASE_TOKEN }}"
"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 }}"
}]
properties: |
[
{ "maven.wagon.http.ssl.insecure": "true" },
{ "maven.wagon.http.ssl.allowall": "true" },
{ "maven.wagon.http.ssl.ignore.validity.dates": "true"}
]
githubServer: false
- name: Build with Maven
run: mvn -P 'github-packages' -B install
- name: Publish package
run: mvn -P github-packages -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcpd.skip=true -B deploy
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: github.event_name == 'release' && github.event.action == 'created'
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'IsantePlus' && github.event_name != 'pull_request' }}

- name: Deploy
run: mvn --batch-mode clean deploy -DskipTests
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'IsantePlus' && github.event_name != 'pull_request'}}


# - uses: s4u/maven-settings-action@v2.2.0
# with:
# servers: |
# [{
# "id": "github-packages",
# "username": "${{ secrets.RELEASE_USERNAME }}",
# "password": "${{ secrets.RELEASE_TOKEN }}"
# }]
# properties: |
# [
# { "maven.wagon.http.ssl.insecure": "true" },
# { "maven.wagon.http.ssl.allowall": "true" },
# { "maven.wagon.http.ssl.ignore.validity.dates": "true"}
# ]
# githubServer: false
# - name: Build with Maven
# run: mvn -P 'github-packages' -B install
# - name: Publish package
# run: mvn -P github-packages -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcpd.skip=true -B deploy
# env:
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
# if: github.event_name == 'release' && github.event.action == 'created'
50 changes: 0 additions & 50 deletions .github/workflows/deploy.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ 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
-----------
Expand Down

0 comments on commit f632bb9

Please sign in to comment.