name: Main Integration — Wukong Overlay on: workflow_run: workflows: - CI types: - completed permissions: {} jobs: notify-downstream: name: Notify Wukong Overlay if: >- github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main' runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Trigger downstream CI env: UPSTREAM_SHA: ${{ github.event.workflow_run.head_sha }} WUKONG_TRIGGER_TOKEN: ${{ secrets.WUKONG_TRIGGER_TOKEN }} WUKONG_TRIGGER_URL: ${{ secrets.WUKONG_TRIGGER_URL }} run: | if [ -n "$WUKONG_TRIGGER_TOKEN" ]; then curl --fail --silent --show-error \ -X POST \ -F "token=$WUKONG_TRIGGER_TOKEN" \ -F "ref=main" \ -F "variables[UPSTREAM_SHA]=$UPSTREAM_SHA" \ "$WUKONG_TRIGGER_URL" echo "Downstream CI triggered." else echo "No WUKONG_TRIGGER_TOKEN configured, skipping downstream notification." fi