Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Read instance ID from cloud-init metadata (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalomaki authored Oct 22, 2021
1 parent b00e70f commit d0e9389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion start/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ runs:
user_data=$(cat <<HERE
#!/bin/bash
cd "$RUNNER_HOME"
instance_id="\$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
instance_id="\$(cat /var/lib/cloud/data/instance-id)"
sudo -u "$RUNNER_USER" ./config.sh --unattended $extra_flags --name "\$instance_id" --url "https://github.com/$GITHUB_REPO" --token "$runner_token" --labels "\$instance_id$extra_labels"
./svc.sh install "$RUNNER_USER"
./svc.sh start
Expand Down

0 comments on commit d0e9389

Please sign in to comment.