Deploy RPC Image #19
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
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}}" | |