forked from XinFinOrg/XDPoSChain
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.15 KB
/
deploy_rpc_image.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
name: Deploy RPC Image
on:
#need to make sure only authorized people can use this function
workflow_dispatch:
inputs:
network:
type: choice
description: 'devnet, testnet, or mainnet'
options:
- devnet
- testnet
- mainnet
rpc_image:
description: 'full image name'
jobs:
ansible:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update RPC nodes image
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: playbooks/update-image.yaml
directory: ./cicd/ansible
key: ${{secrets.SSH_PRIVATE_KEY_DEVNET}}
options: |
--inventory inventory.yaml
--extra-vars network=${{inputs.network}}
--extra-vars rpc_image=${{inputs.rpc_image}}
devnet_send_notification:
runs-on: ubuntu-latest
needs: ansible
steps:
- uses: actions/checkout@v4
- name: Send deployment notification
run: |
curl --location --request POST "66.94.98.186:8080/deploy?environment=${{inputs.network}}&service=xdc_rpc&version=${{inputs.rpc_image}}"