-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update iota-private-network setup and remove tear-down action
- Loading branch information
Showing
3 changed files
with
32 additions
and
68 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,39 @@ | ||
name: "iota-private-network setup" | ||
description: "Setup IOTA Sandbox" | ||
|
||
inputs: | ||
platform: | ||
description: "Platform to download binary for (linux or macos)" | ||
required: true | ||
default: "linux" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout IOTA repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: "iotaledger/iota" | ||
ref: "develop" | ||
path: "iota" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: list files | ||
shell: bash | ||
run: ls -la docker/iota-private-network | ||
|
||
- name: build docker images | ||
- name: Set up IOTA Node | ||
shell: bash | ||
run: | | ||
cd docker/iota-private-network | ||
../iota-node/build.sh -t iota-node --no-cache | ||
../iota-indexer/build.sh -t iota-indexer --no-cache | ||
../iota-tools/build.sh -t iota-tools --no-cache | ||
- name: Bootstrap the network | ||
shell: bash | ||
run: ./bootstrap.sh | ||
working-directory: iota/docker/iota-private-network | ||
# Install dependencies | ||
mkdir -p iota | ||
cd iota | ||
# Select platform-specific asset | ||
if [ "${{ inputs.platform }}" = "linux" ]; then | ||
PLATFORM_FILTER="contains(\"linux\")" | ||
else | ||
PLATFORM_FILTER="contains(\"macos\")" | ||
fi | ||
# Get download URL for specified platform | ||
DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota/releases" | \ | ||
jq -r --arg filter "$PLATFORM_FILTER" \ | ||
'.[0].assets[] | select(.name | contains("iota") and ($filter | eval)) | .browser_download_url') | ||
# Download and extract | ||
curl -L -o iota.tar.gz $DOWNLOAD_URL | ||
tar -xzf iota.tar.gz | ||
- name: Start the Network | ||
shell: bash | ||
run: ./run.sh faucet | ||
working-directory: iota/docker/iota-private-network | ||
|
||
- name: Wait for iota network to start | ||
shell: bash | ||
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" | ||
env: | ||
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 | ||
|
||
- name: Wait for faucet to start | ||
shell: bash | ||
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" | ||
env: | ||
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 | ||
|
||
working-directory: iota | ||
run: ./iota start --with-faucet --force-regenesis & |
This file was deleted.
Oops, something went wrong.
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