File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 99 "log/slog"
1010 "os"
1111 "path/filepath"
12+ "strings"
1213 "time"
1314
1415 "github.com/reMarkable/k8s-hook/pkg/types"
@@ -208,12 +209,17 @@ func (c *K8sClient) preparePodSpec(cont types.ContainerDefinition, podType PodTy
208209 }
209210 var name string
210211 if podType == PodTypeContainerStep {
212+ workspace := os .Getenv ("GITHUB_WORKSPACE" )
213+ // remove anything before _work to get the subpath
214+ i := strings .LastIndex (workspace , "_work/" )
215+ workspaceRelativePath := workspace [i + len ("_work/" ):]
216+
211217 name = c .GetRunnerPodName () + "-step-" + podPostfix ()
212218 jobContainer .VolumeMounts = append ([]v1.VolumeMount {
213219 {
214220 Name : JobVolumeName ,
215221 MountPath : "/github/workspace" ,
216- SubPath : "_temp" ,
222+ SubPath : workspaceRelativePath ,
217223 },
218224 {
219225 Name : JobVolumeName ,
You can’t perform that action at this time.
0 commit comments