forked from novasamatech/nova-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1011 Bytes
/
Copy pathtrigger_event.yml
File metadata and controls
43 lines (38 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Reusable workflow for trigger event in another repo
on:
workflow_call:
inputs:
repository:
required: true
type: string
event-type:
required: true
type: string
payload:
required: true
type: string
secrets:
PR_APP_ID:
required: true
PR_APP_TOKEN:
required: true
env:
PR_APP_ID: ${{ secrets.PR_APP_ID}}
PR_APP_TOKEN: ${{ secrets.PR_APP_TOKEN}}
jobs:
trigger-event:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ env.PR_APP_ID }}
private_key: ${{ env.PR_APP_TOKEN }}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ inputs.repository }}
event-type: ${{ inputs.event-type }}
client-payload: ${{ inputs.payload }}