|
1 |
| -name: "iota-private-network-setup" |
2 |
| -description: "Setup IOTA private network sandbox" |
| 1 | +name: "iota-private-network setup" |
| 2 | +description: "Setup IOTA Sandbox" |
3 | 3 |
|
4 | 4 | runs:
|
5 | 5 | using: composite
|
6 | 6 | steps:
|
7 |
| - - name: Checkout IOTA repository |
8 |
| - uses: actions/checkout@v3 |
9 |
| - with: |
10 |
| - repository: "iotaledger/iota" |
11 |
| - ref: "testnet" |
12 |
| - path: "iota" |
13 |
| - |
14 |
| - - name: list files |
15 |
| - shell: bash |
16 |
| - run: | |
17 |
| - ls -la iota/docker/iota-private-network |
18 |
| -
|
19 |
| - - name: build docker images |
| 7 | + - name: Set up IOTA Node |
20 | 8 | shell: bash
|
21 |
| - working-directory: iota/docker/iota-private-network |
22 | 9 | run: |
|
23 |
| - ../iota-node/build.sh -t iota-node --no-cache |
24 |
| - ../iota-indexer/build.sh -t iota-indexer --no-cache |
25 |
| - ../iota-tools/build.sh -t iota-tools --no-cache |
| 10 | + mkdir -p iota |
| 11 | + cd iota |
| 12 | + # Use the output of https://api.github.com/repos/iotaledger/iota/releases/latest |
26 | 13 |
|
27 |
| - - name: Bootstrap the network |
28 |
| - shell: bash |
29 |
| - run: ./bootstrap.sh |
30 |
| - working-directory: iota/docker/iota-private-network |
| 14 | + DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota/releases" | jq -r '.[0].assets[] | select(.name | contains("iota") and contains("linux")) | .browser_download_url') |
| 15 | + # Download and extract |
| 16 | + curl -L -o iota.tar.gz $DOWNLOAD_URL |
| 17 | + tar -xzf iota.tar.gz |
31 | 18 |
|
32 | 19 | - name: Start the Network
|
33 | 20 | shell: bash
|
34 |
| - run: ./run.sh faucet |
35 |
| - working-directory: iota/docker/iota-private-network |
| 21 | + working-directory: iota |
| 22 | + run: iota start --with-faucet --force-regenesis |
36 | 23 |
|
37 | 24 | - name: Wait for iota network to start
|
38 | 25 | shell: bash
|
39 | 26 | run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:9000 -- echo "IOTA full node is up"
|
40 | 27 | env:
|
41 | 28 | WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3
|
42 | 29 |
|
43 |
| - - name: Wait for faucet to start |
44 |
| - shell: bash |
45 |
| - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:5003 -- echo "Faucet is up" |
46 |
| - env: |
47 |
| - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 |
0 commit comments