Skip to content

Commit

Permalink
Update Update-testnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyfilyanin authored Sep 19, 2023
1 parent 233e073 commit 82a9bf0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/Update-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ jobs:
run: echo "tag=ghcr.io/gear-tech/node:0.1.0-`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_OUTPUT

update-validator:
runs-on: [kuberunner]
runs-on: ubuntu-latest
needs: tag-image
steps:

- name: SSH into VM
uses: appleboy/[email protected]
env:
NEW_IMAGE: ${{ needs.tag-image.outputs.image_tag }}
with:
host: ${{ secrets.VARA_VALIDATOR_8 }}
username: ${{ secrets.SSH_VARA_USERNAME }}
key: ${{ secrets.VARA_SSH_PRIVATE_KEY }}
envs: NEW_IMAGE
script: |
sudo echo "tag=ghcr.io/gear-tech/node:0.1.0-`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_IMAGE_TAG
sudo docker-compose -f /home/gear/docker-compose.yaml down
sudo sed -i 's|ghcr.io/gear-tech/node:.*|$GITHUB_IMAGE_TAG|' /home/gear/docker-compose.yaml
sudo sed -i 's|ghcr.io/gear-tech/node:.*|$NEW_IMAGE|' /home/gear/docker-compose.yaml
sudo docker-compose -f /home/gear/docker-compose.yaml up -d

0 comments on commit 82a9bf0

Please sign in to comment.