diff --git a/.github/workflows/openMINDS_upstream.yml b/.github/workflows/openMINDS_upstream.yml index e757989..16c9306 100644 --- a/.github/workflows/openMINDS_upstream.yml +++ b/.github/workflows/openMINDS_upstream.yml @@ -19,6 +19,7 @@ jobs: include: - repo: openMetadataInitiative/openMINDS_json-schema workflow: build.yml + inputs: '{"branch":"${{ github.ref_name }}","repository":"${{ github.repository }}"}' - repo: openMetadataInitiative/openMINDS_MATLAB workflow: build.yml @@ -28,9 +29,11 @@ jobs: - repo: openMetadataInitiative/openMINDS_Java workflow: build.yml + inputs: '{"branch":"${{ github.ref_name }}","repository":"${{ github.repository }}"}' - repo: openMetadataInitiative/openMINDS_LinkML workflow: build.yml + inputs: '{"branch":"${{ github.ref_name }}","repository":"${{ github.repository }}"}' - repo: openMetadataInitiative/openMINDS_documentation workflow: build.yml @@ -41,16 +44,16 @@ jobs: steps: - name: Trigger target repositories run: | + if [ -n "${{ matrix.inputs }}" ]; then + DATA='{"ref":"pipeline","inputs":'${{ matrix.inputs }}'}' + else + DATA='{"ref":"pipeline"}' + fi + curl -s -w "\n${{ matrix.repo }}: %{http_code}\n" \ -X POST \ -u "${{ secrets.PAT_USERNAME }}:${{ secrets.PAT_TOKEN }}" \ -H "Accept: application/vnd.github+json" \ -H "Content-Type: application/json" \ https://api.github.com/repos/${{ matrix.repo }}/actions/workflows/${{ matrix.workflow }}/dispatches \ - --data "{ - \"ref\": \"pipeline\", - \"inputs\": { - \"branch\": \"${{ github.ref_name }}\", - \"repository\": \"${{ github.repository }}\" - } - }" + --data "$DATA"