Include extra user-agent for runners created by actions-runner-controller. (#2177)

This commit is contained in:
Tingluo Huang
2023-01-18 07:38:59 +09:00
committed by GitHub
parent 23fdca4786
commit bb61bb1342
3 changed files with 19 additions and 10 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ import (
"os/signal"
"syscall"
"github.com/actions/actions-runner-controller/build"
"github.com/actions/actions-runner-controller/github/actions"
"github.com/actions/actions-runner-controller/logging"
"github.com/go-logr/logr"
@@ -83,7 +84,7 @@ func run(rc RunnerScaleSetListenerConfig, logger logr.Logger) error {
}
}
actionsServiceClient, err := actions.NewClient(ctx, rc.ConfigureUrl, creds, "actions-runner-controller", logger)
actionsServiceClient, err := actions.NewClient(ctx, rc.ConfigureUrl, creds, fmt.Sprintf("actions-runner-controller/%s", build.Version), logger)
if err != nil {
return fmt.Errorf("failed to create an Actions Service client: %w", err)
}