act/pkg/runner
Zettat123 92b4d73376 Check volumes (#60)
This PR adds a `ValidVolumes` config. Users can specify the volumes (including bind mounts) that can be mounted to containers by this config.

Options related to volumes:
- [jobs.<job_id>.container.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes)
- [jobs.<job_id>.services.<service_id>.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idvolumes)

In addition, volumes specified by `options` will also be checked.

Currently, the following default volumes (see a72822b3f8/pkg/runner/run_context.go (L116-L166)) will be added to `ValidVolumes`:
- `act-toolcache`
- `<container-name>` and `<container-name>-env`
- `/var/run/docker.sock` (We need to add a new configuration to control whether the docker daemon can be mounted)

Co-authored-by: Jason Song <i@wolfogre.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/60
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-06-05 09:21:59 +00:00
..
res Add super-linter + fix lint issues (#650) 2021-05-03 09:52:03 -07:00
testdata Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
action.go Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
action_composite.go Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
action_test.go refactor: fix savestate in pre steps (#1466) 2022-12-15 17:08:31 +00:00
command.go Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
command_test.go refactor: fix savestate in pre steps (#1466) 2022-12-15 17:08:31 +00:00
container_mock_test.go chore: Remove obsolete Container.UpdateFromPath (#1631) 2023-02-16 16:11:26 +00:00
expression.go Support configuration variables (#43) 2023-04-19 15:22:56 +08:00
expression_test.go feat: Host environment (#1293) 2022-11-16 21:29:45 +00:00
job_executor.go Fix container network issue (#56) 2023-05-16 14:03:55 +08:00
job_executor_test.go feat: allow to spawn and run a local reusable workflow (#1423) 2022-12-15 16:45:22 +00:00
logger.go Merge tag 'nektos/v0.2.43' 2023-03-16 11:45:29 +08:00
reusable_workflow.go Add token for getting reusable workflows from local private repos (#38) 2023-04-06 14:16:20 +08:00
run_context.go Check volumes (#60) 2023-06-05 09:21:59 +00:00
run_context_test.go Merge tag 'nektos/v0.2.43' 2023-03-16 11:45:29 +08:00
runner.go Check volumes (#60) 2023-06-05 09:21:59 +00:00
runner_test.go Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
step.go fix: environment handling windows (host mode) (#1732) 2023-04-18 18:09:57 +00:00
step_action_local.go Fix composite input handling (#1345) 2022-10-06 21:58:16 +00:00
step_action_local_test.go refactor: GITHUB_ENV command / remove env.PATH (#1503) 2023-02-04 13:35:13 +00:00
step_action_remote.go Support for multiple default URLs for getting actions (#58) 2023-06-05 09:07:17 +00:00
step_action_remote_test.go Merge tag 'nektos/v0.2.43' 2023-03-16 11:45:29 +08:00
step_docker.go Merge tag 'nektos/v0.2.34' 2022-12-05 17:08:17 +08:00
step_docker_test.go refactor: GITHUB_ENV command / remove env.PATH (#1503) 2023-02-04 13:35:13 +00:00
step_factory.go feat: split job steps into its own files/structs (#1004) 2022-03-22 14:13:00 -07:00
step_factory_test.go feat: split job steps into its own files/structs (#1004) 2022-03-22 14:13:00 -07:00
step_run.go Make sure working directory is respected when configured from matrix (#1686) 2023-03-28 12:24:03 +00:00
step_run_test.go chore: use new style octal (#1630) 2023-02-16 15:34:51 +00:00
step_test.go fix: environment handling windows (host mode) (#1732) 2023-04-18 18:09:57 +00:00