1
0
mirror of https://gitea.com/gitea/act synced 2024-11-27 07:08:57 +00:00
act/pkg/model/testdata/container-volumes/push.yml
Seunghyun Hwang 407d324ec1
implement volume mount for container job (#1101)
* implement volume mount for container job

* Update pkg/runner/run_context.go

Co-authored-by: Ryan <me@hackerc.at>

* add tests for container volume mount options

* remove unused code

* prefer if-else instead of if-continue

* remove continue

* add some tests

Co-authored-by: Ryan <me@hackerc.at>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-04 18:01:13 +00:00

19 lines
491 B
YAML

name: Job Container
on: push
jobs:
with-volumes:
runs-on: ubuntu-latest
container:
image: node:16-buster-slim
volumes:
- my_docker_volume:/path/to/volume
- /path/to/nonexist/directory
- /proc/sys/kernel/random/boot_id:/current/boot_id
steps:
- run: |
set -e
test -d /path/to/volume
test "$(cat /proc/sys/kernel/random/boot_id)" = "$(cat /current/boot_id)"
test -d /path/to/nonexist/directory