publish manta and calamari parachain container #229
Workflow file for this run
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: publish manta and calamari parachain container | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
docker-hub-deploy: | |
timeout-minutes: 120 | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
runtime: | |
- name: calamari | |
- name: manta | |
steps: | |
- uses: docker/setup-buildx-action@v1 | |
- uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.MANTABOT_DOCKER_USERNAME }} | |
password: ${{ secrets.MANTABOT_DOCKER_TOKEN }} | |
- uses: docker/build-push-action@v2 | |
with: | |
push: true | |
file: docker/${{ matrix.runtime.name }}.Dockerfile | |
tags: | | |
mantanetwork/${{ matrix.runtime.name }}:latest | |
mantanetwork/${{ matrix.runtime.name }}:${{ github.event.release.tag_name }} | |
build-args: | | |
PARA_BINARY_REF=${{ github.event.release.tag_name }} | |
check-docker-hub-deploy: | |
timeout-minutes: 120 | |
needs: docker-hub-deploy | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
runtime: | |
- name: calamari | |
- name: manta | |
steps: | |
- name: run docker image | |
run: | | |
sudo docker run -p 9944:9944 -p 9945:9945 -d mantanetwork/${{ matrix.runtime.name }}:latest --unsafe-rpc-external -- --unsafe-rpc-external > docker_id.log | |
sleep 60 | |
- name: Show log | |
run: | | |
echo "Get the docker container ID:" | |
image_id=`cat docker_id.log` | |
echo $image_id | |
echo "Adjusting permissions so we can access docker logs..." | |
sudo cat /var/lib/docker/containers/${image_id}/${image_id}-json.log | |
- uses: actions/checkout@v2 | |
with: | |
repository: Manta-Network/Dev-Tools | |
path: dev-tools | |
- name: check if target block is finalized | |
run: | | |
cd dev-tools/check-finalized-block | |
yarn install | |
yarn | |
node index.js --para_address=ws://127.0.0.1:9944 --relay_address=ws://127.0.0.1:9945 --target_block=6 | |
if [ $? == 1 ]; then echo "Failed to finalize the target block - 6"; exit 1; fi |