act/pkg
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
..
artifactcache Support cache (#1770) 2023-04-28 15:57:40 +00:00
artifacts fix: tolerate workflow that needs a missing job (#1595) (#1619) 2023-02-16 16:41:59 +00:00
common Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
container Check volumes (#60) 2023-06-05 09:21:59 +00:00
exprparser Support configuration variables (#43) 2023-04-19 15:22:56 +08:00
jobparser Keep the order of on when parsing workflow (#46) 2023-04-24 23:16:41 +08:00
lookpath feat: Host environment (#1293) 2022-11-16 21:29:45 +00:00
model Merge tag 'nektos/v0.2.45' 2023-05-04 17:45:53 +08:00
runner Check volumes (#60) 2023-06-05 09:21:59 +00:00
workflowpattern feat: workflowpattern package (#1618) 2023-02-23 18:21:08 +00:00