-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add GHA for baremetal deployment (#4280)
- Loading branch information
1 parent
a78892d
commit 4153087
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Dispatch workflow to deploy baremetal Gossamer nodes | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit: | ||
description: 'commit' | ||
required: true | ||
nodeType: | ||
description: 'Node type' | ||
required: true | ||
default: 'genesis' | ||
type: choice | ||
options: | ||
- snapshot | ||
- genesis | ||
chain: | ||
description: 'Chain' | ||
required: true | ||
default: 'westend' | ||
type: choice | ||
options: | ||
- paseo | ||
- westend | ||
gossamerStartArgs: | ||
description: 'Arguments' | ||
required: false | ||
|
||
jobs: | ||
dispatch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Token | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v4 | ||
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-baremetal-gossamer-${{ github.event.inputs.nodeType }} | ||
client-payload: | | ||
{ | ||
"ref": "refs/heads/main", | ||
"inputs": { | ||
"commit": "${{ github.event.inputs.commit }}", | ||
"nodeType": "${{ github.event.inputs.nodeType }}", | ||
"chain": "${{ github.event.inputs.chain }}", | ||
"gossamerStartArgs": "${{ github.event.inputs.gossamerStartArgs }}" | ||
} | ||
} |