Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/runners/templates/install-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ mkdir -p actions-runner && cd actions-runner

if [[ -n "$RUNNER_TARBALL_URL" ]]; then
echo "Downloading the GH Action runner from $RUNNER_TARBALL_URL to $file_name"
curl -o $file_name -L "$RUNNER_TARBALL_URL"
curl -s -o $file_name -L "$RUNNER_TARBALL_URL"
else
echo "Retrieving TOKEN from AWS API"
token=$(curl -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 180")
token="$(curl -s -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 180")"

region=$(curl -f -H "X-aws-ec2-metadata-token: $token" -v http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
region="$(curl -s -f -H "X-aws-ec2-metadata-token: $token" http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)"
Comment thread
npalm marked this conversation as resolved.
echo "Retrieved REGION from AWS API ($region)"

echo "Downloading the GH Action runner from s3 bucket $s3_location"
aws s3 cp "$s3_location" "$file_name" --region "$region"
aws s3 cp "$s3_location" "$file_name" --region "$region" --no-progress
fi

echo "Un-tar action runner"
Expand Down
Loading