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 d6c6436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
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
sleep 5
done
IP=$(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" $API_INFO?machineId=$MACHINE_ID | jq -r .publicIpAddress)
IP=$(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/getMachinePublic?machineId=$MACHINE_ID | jq -r .publicIpAddress)
echo "$SSH_KEY" > key
ssh -o "StrictHostKeyChecking no" -i key paperspace@$IP 'touch "gha-run-${{ github.run_id }}.lock"'
env:
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v3
- name: Stop self-hosted runners
run: |
IP=$(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" $API_INFO?machineId=$MACHINE_ID | jq -r .publicIpAddress)
IP=$(curl -fsSL -X GET -H "X-Api-Key: $API_KEY" https://api.paperspace.io/machines/getMachinePublic?machineId=$MACHINE_ID | jq -r .publicIpAddress)
echo "$SSH_KEY" > key
ssh -o "StrictHostKeyChecking no" -i key paperspace@$IP \
'rm -f "gha-run-${{ github.run_id }}.lock"; sleep 10; ls gha-run-*.lock' || \
Expand Down

0 comments on commit d6c6436

Please sign in to comment.