Skip to content

Commit 0762f4d

Browse files
authored
Merge pull request #836 from JanLipovsek/get_child_run_id
added child run id to summary
2 parents 98ce40c + 88cad0e commit 0762f4d

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,33 @@ jobs:
540540
event-type: depthai-python-release
541541
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
542542

543+
# notify_hil_workflow_linux_x86_64:
544+
# needs: [build-linux-x86_64]
545+
# runs-on: ubuntu-latest
546+
# steps:
547+
# - name: Repository Dispatch
548+
# uses: peter-evans/repository-dispatch@v2
549+
# with:
550+
# token: ${{ secrets.HIL_CORE_DISPATCH_TOKEN }}
551+
# repository: luxonis/depthai-core-hil-tests
552+
# event-type: python-hil-event
553+
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
554+
543555
notify_hil_workflow_linux_x86_64:
544556
needs: [build-linux-x86_64]
545557
runs-on: ubuntu-latest
546558
steps:
547-
- name: Repository Dispatch
548-
uses: peter-evans/repository-dispatch@v2
549-
with:
550-
token: ${{ secrets.HIL_CORE_DISPATCH_TOKEN }}
551-
repository: luxonis/depthai-core-hil-tests
552-
event-type: python-hil-event
553-
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
559+
- name: Dispatch an action and get the run ID
560+
uses: codex-/return-dispatch@v1
561+
id: return_dispatch
562+
with:
563+
token: ${{ secrets.HIL_CORE_DISPATCH_TOKEN }} # Note this is NOT GITHUB_TOKEN but a PAT
564+
ref: main # or refs/heads/target_branch
565+
repo: depthai-core-hil-tests
566+
owner: luxonis
567+
workflow: regression_test.yml
568+
workflow_inputs: '{"commit": "${{ github.ref }}", "sha": "${{ github.sha }}", "parent_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
569+
workflow_timeout_seconds: 120 # Default: 300
570+
571+
- name: Release
572+
run: echo "https://github.com/luxonis/depthai-core-hil-tests/actions/runs/${{steps.return_dispatch.outputs.run_id}}" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)