diff --git a/README.md b/README.md index 81d52c9..04fcf5d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,13 @@ The GitHub action takes the following inputs: If set to `true`, the action will install a mirror node in addition to the main node. The mirror node can be accessed at `localhost:8080`. +| Input | Description | Required | Default | +|----------------|-------------------------------|----------|---------| +| `installRelay` | Install JSON-RPC-Relay | false | false | + +- `installRelay`: A boolean parameter that is `false` by default. + If set to `true`, the action will install the JSON-RPC-Relay as part of the setup process. This allows you to easily add a relay to your Hedera network setup. The relay is installed using the `solo relay deploy` command. + ## Outputs The GitHub action outputs the following information: diff --git a/action.yml b/action.yml index 02db0e9..6117ebc 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,11 @@ inputs: description: "Port for Mirror Node" required: false default: "8080" + installRelay: + description: 'Install JSON-RPC-Relay' + required: false + default: false + type: boolean outputs: accountId: description: "Hedera account id for a new account" @@ -83,6 +88,15 @@ runs: solo mirror-node deploy kubectl port-forward svc/fullstack-deployment-hedera-explorer -n solo-test ${{ inputs.mirrorNodePort }}:80 & + - name: Deploy JSON-RPC-Relay + if: ${{ inputs.installRelay == 'true' }} + shell: bash + run: | + echo "Installing JSON-RPC-Relay..." + solo relay deploy + echo "JSON-RPC-Relay installed successfully" + + - name: Create account id: create-account shell: bash