Skip to content

Commit

Permalink
BAH-1386 | Added trigger to openmrs-distro-bahmni
Browse files Browse the repository at this point in the history
Co-authored-by: Soorya Kumaran C<[email protected]>
  • Loading branch information
umair-fayaz committed Feb 8, 2022
1 parent 35d2df5 commit 8ffb362
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Continuous Integration
on:
# workflow_run:
# workflows: [Build and generate artifacts for openmrs-module-episodes]
# types:
# - completed
push:
branches:
- master
- BAH-*


env:
ORG_NAME: Bahmni
EVENT_TYPE: openmrs-module-episodes-trigger
jobs:
demo:
name: Trigger Workflows
runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
dependent-repos: ["openmrs-distro-bahmni"]
steps:
- name: Create repository_dispatch
env:
REPOSITORY_NAME: ${{ matrix.dependent-repos }}
run : |
trigger_result=$(curl -s -o trigger_response.txt -w "%{http_code}" -X POST -H "Accept: application/vnd.github.v3+json" -H 'authorization: Bearer ${{ secrets.WORKFLOW_TRIGGER_TOKEN }}' https://api.github.com/repos/${ORG_NAME}/${REPOSITORY_NAME}/dispatches -d '{"event_type":"'"${EVENT_TYPE}"'"}')
if [ $trigger_result == 204 ];then
echo "Trigger to $ORG_NAME/$REPOSITORY_NAME Success"
else
echo "Trigger to $ORG_NAME/$REPOSITORY_NAME Failed"
cat trigger_response.txt
exit 1
fi
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<mockitoVersion>1.10.19</mockitoVersion>
</properties>

<distributionManagement>
<!-- <distributionManagement>
<snapshotRepository>
<id>repo.mybahmni.org</id>
<name>bahmni-artifactory-snapshots</name>
<url>s3://repo.mybahmni.org/artifactory/snapshot</url>
</snapshotRepository>
</distributionManagement>
</distributionManagement> -->
<profiles>
<profile>
<id>github</id>
Expand Down

0 comments on commit 8ffb362

Please sign in to comment.