From 3a9d970bb5d2222540b6b2e1ee237180c3db6a52 Mon Sep 17 00:00:00 2001 From: raphaelgazzotti Date: Thu, 18 Jun 2026 11:25:56 +0200 Subject: [PATCH] Replace curl dispatches with matrix strategy. --- .github/workflows/openMINDS_upstream.yml | 46 +++++++++++++++++++----- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/.github/workflows/openMINDS_upstream.yml b/.github/workflows/openMINDS_upstream.yml index 2aa4146..e757989 100644 --- a/.github/workflows/openMINDS_upstream.yml +++ b/.github/workflows/openMINDS_upstream.yml @@ -13,14 +13,44 @@ on: jobs: build: runs-on: ubuntu-latest + + strategy: + matrix: + include: + - repo: openMetadataInitiative/openMINDS_json-schema + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_MATLAB + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_Python + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_Java + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_LinkML + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_documentation + workflow: build.yml + + - repo: openMetadataInitiative/openMINDS_documentation + workflow: htaccess-deploy.yml + steps: - name: Trigger target repositories run: | - curl -s -w "\nJSON-Schema: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_json-schema/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nMATLAB: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_MATLAB/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nPython: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_Python/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nJava: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_Java/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nLinkML: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_LinkML/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nDocs build: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_documentation/actions/workflows/build.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - curl -s -w "\nDocs htaccess: %{http_code}\n" -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/openMetadataInitiative/openMINDS_documentation/actions/workflows/htaccess-deploy.yml/dispatches --data '{"ref": "pipeline", "inputs": {"branch": "${{github.ref_name}}", "repository": "${{ github.repository }}"}}' - + 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 }}\" + } + }"