Skip to content

Commit

Permalink
Customize work directory
Browse files Browse the repository at this point in the history
It allows us to customize the working directory during worker registration.
  • Loading branch information
sergelogvinov committed Apr 28, 2024
1 parent 49490c4 commit d12f7c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions controllers/actions.github.com/ephemeralrunner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,14 @@ func (r *EphemeralRunnerReconciler) updateStatusWithRunnerConfig(ctx context.Con
jitSettings := &actions.RunnerScaleSetJitRunnerSetting{
Name: ephemeralRunner.Name,
}

for c := range ephemeralRunner.Spec.Spec.Containers {
if ephemeralRunner.Spec.Spec.Containers[c].Name == EphemeralRunnerContainerName &&
ephemeralRunner.Spec.Spec.Containers[c].WorkingDir != "" {
jitSettings.WorkFolder = ephemeralRunner.Spec.Spec.Containers[c].WorkingDir
}
}

jitConfig, err := actionsClient.GenerateJitRunnerConfig(ctx, jitSettings, ephemeralRunner.Spec.RunnerScaleSetId)
if err != nil {
actionsError := &actions.ActionsError{}
Expand Down

0 comments on commit d12f7c4

Please sign in to comment.