Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
ci: machine start fix
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jul 28, 2023
1 parent dbf6961 commit 914ab21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ jobs:
- name: Launch self-hosted runners
if: steps.list.outputs.modified != 'modified=[]'
run: |
curl -sSL -X POST -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/$MACHINE/start
while test $(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/getMachinePublic?machineId=$MACHINE | jq -r .state) != ready; do
ready(){
test $(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/getMachinePublic?machineId=$MACHINE | jq -r .state) = ready
}
ready || curl -sSL -X POST -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/$MACHINE/start
while test ! ready; do
sleep 5
done
IP=$(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" $API_INFO?machineId=$MACHINE_ID | jq -r .publicIpAddress)
Expand Down

0 comments on commit 914ab21

Please sign in to comment.