mirror of
https://github.com/ROCm/ROCm.git
synced 2026-01-10 07:08:08 -05:00
External CI: Add GitHub Actions repository dispatch template (#4576)
This commit is contained in:
committed by
GitHub
parent
44374fa6a4
commit
bd887d9b3b
33
.azuredevops/templates/steps/gh-actions-post.yml
Normal file
33
.azuredevops/templates/steps/gh-actions-post.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
parameters:
|
||||
- name: repo-name
|
||||
type: string
|
||||
default: ''
|
||||
- name: event-type
|
||||
type: string
|
||||
default: ''
|
||||
- name: azure-ci-job-number
|
||||
type: string
|
||||
default: ''
|
||||
- name: github-actions-token
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
steps:
|
||||
- task: Bash@3
|
||||
name: ghActionsPost
|
||||
displayName: Post a request to a github repository with a repository_dispatch workflow
|
||||
continueOnError: true
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
script: |
|
||||
curl -X POST \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Authorization: token ${{ parameters.github-actions-token }}" \
|
||||
https://api.github.com/repos/${{ parameters.repo-name }}/dispatches \
|
||||
-d '{
|
||||
"event_type": "${{ parameters.event-type }}",
|
||||
"client_payload": {
|
||||
"azure-job-id": "${{ parameters.azure-ci-job-number }}"
|
||||
}
|
||||
}'
|
||||
Reference in New Issue
Block a user