From cc4128c4036630fa46305f5371112bfe3a1f7605 Mon Sep 17 00:00:00 2001 From: Bartosz Burda Date: Tue, 3 Mar 2026 09:50:38 +0100 Subject: [PATCH 1/2] ci: trigger selfpatch_demos build after Jazzy CI passes on main --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 685a5bc..c6e7915 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -404,3 +404,18 @@ jobs: name: ros2_medkit-coverage fail_ci_if_error: true verbose: true + + notify-demos: + needs: [jazzy-lint, jazzy-test] + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Trigger selfpatch_demos CI + uses: peter-evans/repository-dispatch@v4 + with: + token: ${{ secrets.DEMOS_DISPATCH_TOKEN }} + repository: selfpatch/selfpatch_demos + event-type: ros2_medkit_updated + client-payload: >- + {"sha": "${{ github.sha }}", + "run_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"} From ac9e4a33776aa2cc017492f5482e8f28fe115e5a Mon Sep 17 00:00:00 2001 From: Bartosz Burda Date: Tue, 3 Mar 2026 09:59:23 +0100 Subject: [PATCH 2/2] ci: fix notify-demos if condition, payload format and add permissions - Guard against skipped upstream jobs by checking needs.jazzy-lint.result and needs.jazzy-test.result == 'success' explicitly - Replace fragile multi-line >- client-payload with a single-line string - Add permissions: {} to document the job needs no GITHUB_TOKEN access - Add comment documenting intentional Humble exclusion policy --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e7915..01b5683 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -407,8 +407,14 @@ jobs: notify-demos: needs: [jazzy-lint, jazzy-test] - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: >- + github.event_name == 'push' && + github.ref == 'refs/heads/main' && + needs.jazzy-lint.result == 'success' && + needs.jazzy-test.result == 'success' runs-on: ubuntu-latest + # Only Jazzy gates the dispatch. Humble failures do not block demos CI - intentional tradeoff. + permissions: {} steps: - name: Trigger selfpatch_demos CI uses: peter-evans/repository-dispatch@v4 @@ -416,6 +422,4 @@ jobs: token: ${{ secrets.DEMOS_DISPATCH_TOKEN }} repository: selfpatch/selfpatch_demos event-type: ros2_medkit_updated - client-payload: >- - {"sha": "${{ github.sha }}", - "run_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"} + client-payload: '{"sha":"${{ github.sha }}","run_url":"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'