Skip to content

BAH-2881 | Add artefacts for DB backup images of 1.0.0-standard (#32) #13

BAH-2881 | Add artefacts for DB backup images of 1.0.0-standard (#32)

BAH-2881 | Add artefacts for DB backup images of 1.0.0-standard (#32) #13

Workflow file for this run

name: Trigger dependencies
on:
push:
branches:
- master
paths:
- "demo/db-backups/**"
env:
ORG_NAME: Bahmni
EVENT_TYPE: bahmni-scripts-trigger
jobs:
trigger-dependent-repos:
name: Trigger Workflows
runs-on: ubuntu-latest
strategy:
matrix:
dependent-repos: ["odoo-modules", "OpenElis", "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.BAHMNI_PAT }}' 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