This repository was archived by the owner on Jan 16, 2025. It is now read-only.
File tree 1 file changed +7
-0
lines changed
modules/runners/templates
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ echo "Retrieved REGION from AWS API ($region)"
13
13
instance_id=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/instance-id)
14
14
echo " Retrieved INSTANCE_ID from AWS API ($instance_id )"
15
15
16
+ instance_type=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/instance-type)
17
+ availability_zone=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/placement/availability-zone)
18
+
16
19
%{ if metadata_tags == " enabled" }
17
20
environment=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/tags/instance/ghr:environment)
18
21
ssm_config_path=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/tags/instance/ghr:ssm_config_path)
@@ -92,6 +95,10 @@ tee /opt/actions-runner/.setup_info <<EOL
92
95
{
93
96
"group": "Runner Image",
94
97
"detail": "AMI id: $ami_id "
98
+ },
99
+ {
100
+ "group": "EC2 ",
101
+ "detail": "Instance type: $instance_type \nAvailability zone: $availability_zone "
95
102
}
96
103
]
97
104
EOL
You can’t perform that action at this time.
0 commit comments