Skip to content

Commit eed7d91

Browse files
malfetpytorchmergebot
authored andcommitted
Enhance GCP runner check for Google Cloud Platform (#169848)
GCP runners can have "google" in their name Pull Request resolved: #169848 Approved by: https://github.com/oulgen
1 parent 7c593b9 commit eed7d91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/actions/setup-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
runner_name_str=${{ runner.name }}
1818
if [[ -f /.inarc ]]; then
1919
echo "ARC Runner, no info on ec2 metadata"
20-
elif [[ $runner_name_str == *"gcp"* ]]; then
20+
elif [[ $runner_name_str == *"gcp"* || $runner_name_str == *"google"* ]]; then
2121
echo "Runner is from Google Cloud Platform, No info on ec2 metadata"
2222
else
2323
curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}"

0 commit comments

Comments
 (0)