File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -188,9 +188,18 @@ func (rc *RunContext) startHostEnvironment() common.Executor {
188188 return true
189189 })
190190 cacheDir := rc .ActionCacheDir ()
191- randBytes := make ([]byte , 8 )
192- _ , _ = rand .Read (randBytes )
193- miscpath := filepath .Join (cacheDir , hex .EncodeToString (randBytes ))
191+ var miscpath string
192+ workdir := rc .Config .HostEnvironmentDir
193+ if workdir == "" {
194+ randBytes := make ([]byte , 8 )
195+ _ , _ = rand .Read (randBytes )
196+ workdir = hex .EncodeToString (randBytes )
197+ }
198+ if filepath .IsAbs (workdir ) {
199+ miscpath = workdir
200+ } else {
201+ miscpath = filepath .Join (cacheDir , workdir )
202+ }
194203 actPath := filepath .Join (miscpath , "act" )
195204 if err := os .MkdirAll (actPath , 0o777 ); err != nil {
196205 return err
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ type Config struct {
6161 Matrix map [string ]map [string ]bool // Matrix config to run
6262 ContainerNetworkMode docker_container.NetworkMode // the network mode of job containers (the value of --network)
6363 ActionCache ActionCache // Use a custom ActionCache Implementation
64+ HostEnvironmentDir string // Custom folder for host environment, parallel jobs must be 1
6465}
6566
6667type caller struct {
You can’t perform that action at this time.
0 commit comments