Skip to content

Commit

Permalink
ci(github): fix join action images
Browse files Browse the repository at this point in the history
  • Loading branch information
corverroos committed Oct 18, 2024
1 parent a158a58 commit fb19228
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ci-join.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ jobs:
join:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Run a full node
run: |
# As per public docs
curl -sSfL https://raw.githubusercontent.com/omni-network/omni/main/scripts/install_omni_cli.sh | bash -s
# Build main docker images
make build-docker
# Install latest omni CLI
go install github.com/omni-network/omni/cli/cmd/omni
# init halo and geth
$HOME/bin/omni operator init-nodes --network=omega --moniker=ci-nightly --home=$(pwd)
~/go/bin/omni operator init-nodes --network=omega --moniker=ci-nightly --home=$(pwd)
# start halo and geth
docker compose up -d
Expand All @@ -30,7 +37,8 @@ jobs:
t0=$(date +%s) # Record the start time
while true; do
elapsed=$(($(date +%s) - t0)) # Calculate the elapsed time in seconds
ELAPSED=$(($(date +%s) - t0)) # Calculate the elapsed time in seconds
ELAPSED_FMT="$((elapsed / 3600))h$(( (elapsed % 3600) / 60 ))m"
# If more than 6 hours (21600 seconds) have passed, exit with a failure message
if [ $elapsed -gt 21600 ]; then
Expand All @@ -40,16 +48,16 @@ jobs:
# Get and print halo's health status
STATUS=$(docker inspect --format "{{json .State.Health.Status }}" halo | sed 's/"//g')
echo "$(date +'%H:%M:%S') status=${STATUS}"
echo "$(date +'%H:%M:%S') status=${STATUS} elapsed=${ELAPSED_FMT}"
# If the container is "healthy", it has synced, we are done
if [ "${STATUS}" == "healthy" ]; then
echo "Node synced"
break
fi
# Wait for 5 seconds before checking again
sleep 5
# Wait for 30 seconds before checking again
sleep 30
done
- name: Stop the node
Expand Down

0 comments on commit fb19228

Please sign in to comment.