Skip to content

Commit

Permalink
fix issue parsing drops
Browse files Browse the repository at this point in the history
  • Loading branch information
Jivings committed Mar 14, 2023
1 parent 65652b0 commit ede3a52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: 'Get Droplet IPs'
description: 'Get the IPs to deploy to using tags'
name: "Get Droplet IPs"
description: "Get the IPs to deploy to using tags"
inputs:
digital-ocean-key:
description: 'The API KEY for DO'
description: "The API KEY for DO"
required: true
tags:
description: The tags of the servers
tag:
description: The tag of the servers to fetch
required: true

outputs:
server_ips: # id of output
description: 'The IPs that match the provided tags'
description: "The IPs that match the provided tags"
runs:
using: 'node16'
main: 'index.js'
using: "node16"
main: "index.js"
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ try {
})
.then((drops) => {
console.log(`Found ${drops.length} matching droplets`);
return drops.map((d) => d[0].networks.v4[0].ip_address);
return drops.map((d) => d.networks.v4[0].ip_address);
})
.then((ips) => {
core.setOutput("server_ips", ips || []);
Expand Down

0 comments on commit ede3a52

Please sign in to comment.