mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2025-01-15 13:26:38 +00:00
Added server teardown phase
This commit is contained in:
parent
48af87d2ba
commit
715b230566
|
@ -88,15 +88,12 @@ steps:
|
|||
from_secret: ZONE_ID
|
||||
commands:
|
||||
- >
|
||||
curl -s
|
||||
-H "Authorization: Bearer $PASSWORD"
|
||||
'https://api.hetzner.cloud/v1/servers' > .hetzner_servers.json
|
||||
curl -s "https://api.hetzner.cloud/v1/servers"
|
||||
-H "Authorization: Bearer $PASSWORD" > .hetzner_servers.json
|
||||
- export machineid=$( for i in {0..24}; do jq 'if .servers['$i'].name == "ci-sibling" then .servers['$i'].id else null end' .hetzner_servers.json; done | grep -v null | sed 's/"//g')
|
||||
- >
|
||||
curl -s
|
||||
-X DELETE
|
||||
curl -s -X DELETE "https://api.hetzner.cloud/v1/servers/$machineid"
|
||||
-H "Authorization: Bearer $PASSWORD"
|
||||
https://api.hetzner.cloud/v1/servers/$machineid
|
||||
- >
|
||||
curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records"
|
||||
-H "Authorization: Bearer $CLOUDFLARE_TOKEN"
|
||||
|
|
Loading…
Reference in a new issue