Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Siva Reddy | BS-42 | deployment to SNOMED Environment #183

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build and Publish package
on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
build-publish-package:
name: Build and Publish package
Expand All @@ -24,3 +26,24 @@ jobs:
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

trigger:
name: Trigger Deployment Workflow in Distro Bahmni
needs:
- build-publish-package
runs-on: ubuntu-latest
env:
ORG_NAME: Bahmni
REPOSITORY_NAME: openmrs-distro-bahmni
ENVIRONMENT: dev
steps:
- name: Create workflow_dispatch
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.BAHMNI_PAT }}' https://api.github.com/repos/${ORG_NAME}/${REPOSITORY_NAME}/actions/workflows/build_publish_openmrs.yml/dispatches -d '{"ref":"snomed-master","inputs":{}')
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