Skip to content

Commit d12f7c4

Browse files
committed
Customize work directory
It allows us to customize the working directory during worker registration.
1 parent 49490c4 commit d12f7c4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

controllers/actions.github.com/ephemeralrunner_controller.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,14 @@ func (r *EphemeralRunnerReconciler) updateStatusWithRunnerConfig(ctx context.Con
521521
jitSettings := &actions.RunnerScaleSetJitRunnerSetting{
522522
Name: ephemeralRunner.Name,
523523
}
524+
525+
for c := range ephemeralRunner.Spec.Spec.Containers {
526+
if ephemeralRunner.Spec.Spec.Containers[c].Name == EphemeralRunnerContainerName &&
527+
ephemeralRunner.Spec.Spec.Containers[c].WorkingDir != "" {
528+
jitSettings.WorkFolder = ephemeralRunner.Spec.Spec.Containers[c].WorkingDir
529+
}
530+
}
531+
524532
jitConfig, err := actionsClient.GenerateJitRunnerConfig(ctx, jitSettings, ephemeralRunner.Spec.RunnerScaleSetId)
525533
if err != nil {
526534
actionsError := &actions.ActionsError{}

0 commit comments

Comments
 (0)