Skip to content

Commit

Permalink
new idea part #6
Browse files Browse the repository at this point in the history
  • Loading branch information
parhamrahmani committed May 27, 2024
1 parent 431a1e4 commit 6e35ed4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy-to-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,16 @@ jobs:
cat autoscaling_instance_ips.txt
ips_file="autoscaling_instance_ips.txt"
IFS=$'\n' read -r -a ips < "$ips_file"
for i in "${!ips[@]}"; do
./update_instance.sh ${ips[i]}
# Debug output to verify IPs
echo "IP addresses read from file:"
for ip in "${ips[@]}"; do
echo "$ip"
done
# Loop through the IP addresses and run the update script
for ip in "${ips[@]}"; do
echo "Updating instance with IP: $ip"
./update_instance.sh "$ip"
done
Expand Down

0 comments on commit 6e35ed4

Please sign in to comment.