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 May 26, 2024
1 parent 3be7128 commit 05bcde7
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 05bcde7

Please sign in to comment.