File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
modules/runners/templates Expand file tree Collapse file tree 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)"
1313instance_id=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/instance-id)
1414echo " Retrieved INSTANCE_ID from AWS API ($instance_id )"
1515
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+
1619%{ if metadata_tags == " enabled" }
1720environment=$( curl -f -H " X-aws-ec2-metadata-token: $token " -v http://169.254.169.254/latest/meta-data/tags/instance/ghr:environment)
1821ssm_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
9295 {
9396 "group": "Runner Image",
9497 "detail": "AMI id: $ami_id "
98+ },
99+ {
100+ "group": "EC2 ",
101+ "detail": "Instance type: $instance_type \nAvailability zone: $availability_zone "
95102 }
96103]
97104EOL
You can’t perform that action at this time.
0 commit comments