Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa authored Oct 8, 2023
1 parent 1191871 commit b8842b3
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/trigger-tracing-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
build-args: |
DARWINIA_VERSION=${{ env.DARWINIA_VERSION }}
- name: Trigger deploy
if: ${{ matrix.type == 'testnets' }}
- name: Trigger deploy (testnets)
if: ${{ github.event.inputs.type == 'testnets' }}
env:
DARWINIA_VERSION: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GH_TKN_DARWINIA }}
Expand All @@ -104,3 +104,33 @@ jobs:
--repo=darwinia-network/ansible-playbooks \
--raw-field="changes=${MULTI_CHANGES}" \
--raw-field="message=[devops]: [testnets-tracing] ${MESSAGE}"
- name: Trigger deploy (mainnets)
if: ${{ github.event.inputs.type == 'mainnets' }}
env:
DARWINIA_VERSION: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GH_TKN_DARWINIA }}
run: |
MESSAGE='${{ github.event.head_commit.message }}'
DOCKER_IMAGE_TAG=${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/darwinia-tracing:${{ env.DARWINIA_VERSION }}
jq -n \
--arg file playbooks/crab_nodes/host_vars/c1.crab2 \
--arg key .substrate_node_runner.node.image \
--arg value ${DOCKER_IMAGE_TAG} \
'{file: $file, key: $key, value: $value}' >> /tmp/changes.json
jq -n \
--arg file playbooks/darwinia_nodes/host_vars/c1.darwinia2 \
--arg key .substrate_node_runner.node.image \
--arg value ${DOCKER_IMAGE_TAG} \
'{file: $file, key: $key, value: $value}' >> /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=[devops]: [testnets-tracing] ${MESSAGE}"

0 comments on commit b8842b3

Please sign in to comment.