act_runner/internal/app/run
silverwind 9933ea0d92 feat: add configurable bind_workdir option with workspace cleanup for DinD setups (#810)
## Summary

Adds a `container.bind_workdir` config option that exposes the nektos/act `BindWorkdir` setting. When enabled, workspaces are bind-mounted from the host filesystem instead of Docker volumes, which is required for DinD setups where jobs use `docker compose` with bind mounts (e.g. `.:/app`).

Each job gets an isolated workspace at `/workspace/<task_id>/<owner>/<repo>` to prevent concurrent jobs from the same repo interfering with each other. The task directory is cleaned up after job execution.

### Configuration

```yaml
container:
  bind_workdir: true
```

When using this with DinD, also mount the workspace parent into the runner container and add it to `valid_volumes`:
```yaml
container:
  valid_volumes:
    - /workspace/**
```

*This PR was authored by Claude (AI assistant)*

Reviewed-on: https://gitea.com/gitea/act_runner/pulls/810
Reviewed-by: ChristopherHX <38043+christopherhx@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-03-03 10:15:06 +00:00
..
logging.go Don't log job output when debug logging is not enabled (#543) 2024-05-07 05:58:33 +00:00
runner.go feat: add configurable bind_workdir option with workspace cleanup for DinD setups (#810) 2026-03-03 10:15:06 +00:00
workflow.go chore(deps): update act to v0.261.8 (#791) 2026-02-18 05:37:21 +00:00
workflow_test.go chore(lint): add golangci-lint v2 and fix all lint issues (#803) 2026-02-22 17:35:08 +00:00