Merge pull request #82 from Tonomy-Foundation/feature/73-disable-unused #39
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
on: | |
push: | |
branches: | |
- development | |
jobs: | |
build: | |
name: Compile eosio.boot, eosio.bios and id.tmy contracts | |
runs-on: ubuntu-20.04 | |
container: tonomy/antelope | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build eosio.boot contract | |
run: ./contracts/eosio.boot/build.sh local | |
- name: Build eosio.bios contract | |
run: ./contracts/eosio.bios/build.sh local | |
- name: Build id.tmy contract | |
run: ./contracts/id.tmy/build.sh local | |
- name: Add eosio.boot contracts to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eosio.boot | |
path: ./contracts/eosio.boot | |
- name: Add eosio.bios contracts to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: eosio.bios | |
path: ./contracts/eosio.bios | |
- name: Add built contracts to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: id.tmy | |
path: ./contracts/id.tmy | |
deploy-staging: | |
name: Deploy id.tmy contract to staging | |
needs: build | |
runs-on: ubuntu-20.04 | |
container: tonomy/antelope | |
env: | |
ID_TONOMY_PRIVATE_KEY: ${{ secrets.ID_TONOMY_PRIVATE_KEY }} | |
steps: | |
- name: Get built contracts from cache | |
uses: actions/download-artifact@v3 | |
with: | |
name: id.tmy | |
path: contracts/id.tmy | |
- name: Deploy id.tmy contract | |
run: | | |
cleos wallet create --file ./wallet.txt | |
cleos wallet import --private-key $ID_TONOMY_PRIVATE_KEY | |
ls ./contracts/id.tmy | |
cleos -u "https://blockchain-api-staging.tonomy.foundation" set contract id.tmy ./contracts/id.tmy id.tmy.wasm id.tmy.abi | |
push-docker: | |
name: Builds docker image and push to Docker Hub | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get eosio.boot contracts from cache | |
uses: actions/download-artifact@v3 | |
with: | |
name: eosio.boot | |
path: contracts/eosio.boot | |
- name: Get eosio.bios contracts from cache | |
uses: actions/download-artifact@v3 | |
with: | |
name: eosio.bios | |
path: contracts/eosio.bios | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./blockchain/Dockerfile | |
target: tonomy_blockchain_base | |
push: true | |
tags: tonomy/blockchain:base-development | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./blockchain/Dockerfile | |
target: tonomy_blockchain_initialized | |
push: true | |
tags: tonomy/blockchain:initialized-development | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./blockchain/Dockerfile | |
target: tonomy_blockchain_nodejs | |
push: true | |
tags: tonomy/blockchain:nodejs-development |