-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (99 loc) · 3.23 KB
/
deploy-testnet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: "Deploy to testnet and build docker image"
on:
push:
branches:
- testnet
jobs:
build:
name: Compile eosio.boot, eosio.bios and tonomy 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 tonomy contract
run: ./contracts/tonomy/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: tonomy
path: ./contracts/tonomy
deploy-testnet:
name: Deploy tonomy contract to testnet
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: tonomy
path: contracts/tonomy
- name: Deploy tonomy contract
run: |
cleos wallet create --file ./wallet.txt
cleos wallet import --private-key $ID_TONOMY_PRIVATE_KEY
ls ./contracts/tonomy
cleos -u "https://blockchain-api-testnet.pangea.web4.world" set contract tonomy ./contracts/tonomy tonomy.wasm tonomy.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-rc
- 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-rc
- 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-rc