Skip to content

Update provider

Update provider #24

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy-rpc:
name: Deploy rpc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
env:
GOMPLATE_VERSION: 3.11.4
MILLER_VERSION: 6.7.0
run: |
BIN_PATH=$HOME/.local/bin
rm -rf ${BIN_PATH} || true
mkdir -p ${BIN_PATH}
# gomplate
curl -L -o ${BIN_PATH}/gomplate \
https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-amd64
# miller
curl -LO https://github.com/johnkerl/miller/releases/download/v${MILLER_VERSION}/miller-${MILLER_VERSION}-linux-386.tar.gz
tar -zxf miller-${MILLER_VERSION}-linux-386.tar.gz -C ./
mv miller-${MILLER_VERSION}-linux-386/mlr $BIN_PATH/
# set execute permission
chmod +x ${BIN_PATH}/gomplate
chmod +x ${BIN_PATH}/mlr
# clean
rm -rf miller-*
- name: Generate cds
run: scripts/generate-cds.sh
- name: Trigger deploy
env:
GITHUB_TOKEN: ${{ secrets.GH_TKN_DARWINIA }}
run: |
MESSAGE="${{ github.event.head_commit.message }}"
jq -n \
--arg file roles/community-rpc/files/cds.yaml \
--arg content "$(cat dist/cds.local.yaml)" \
'{file: $file, content: $content}' >> /tmp/changes.json
MULTI_CHANGES=$(jq -crs '.' < /tmp/changes.json)
gh workflow run \
trigger.yml \
--ref=main \
--repo=darwinia-network/ansible-playbooks \
--raw-field="changes=${MULTI_CHANGES}" \
--raw-field="message=[community-rpc]: ${MESSAGE}" \