-
Notifications
You must be signed in to change notification settings - Fork 112
59 lines (56 loc) · 1.64 KB
/
dispatch.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Dispatch workflow to deploy Gossamer nodes
on:
workflow_dispatch:
inputs:
commit:
description: 'commit'
required: true
nodeType:
description: 'Node type'
required: true
default: 'genesis'
type: choice
options:
- snapshot
- genesis
cluster:
description: 'Cluster'
default: 'shared-gossamer'
type: choice
options:
- shared-gossamer
- shared-gossamer-2
required: true
chain:
description: 'Chain'
required: true
default: 'westend'
type: choice
options:
- paseo
- westend
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v3
with:
application_id: ${{ vars.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
- name: Dispatch Repository Event for ${{ github.event.inputs.chain }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.get_workflow_token.outputs.token }}
repository: Chainsafe/infrastructure-general
event-type: deploy-gossamer-${{ github.event.inputs.nodeType }}
client-payload: |
{
"ref": "refs/heads/main",
"inputs": {
"commit": "${{ github.event.inputs.commit }}",
"chain": "${{ github.event.inputs.chain }}",
"cluster": "${{ github.event.inputs.cluster }}"
}
}