mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-28 01:01:05 -05:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
|
on: [push]
|
||
|
|
||
|
jobs:
|
||
|
#
|
||
|
# A --volume option will expose the volume from the docker host to the job
|
||
|
#
|
||
|
volume-on-step:
|
||
|
runs-on: docker
|
||
|
container:
|
||
|
image: debian:bookworm
|
||
|
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid --volume /srv/example-service-volume-invalid:/srv/example-service-volume-invalid"
|
||
|
|
||
|
steps:
|
||
|
- run: |
|
||
|
test -f /srv/example-service-volume-valid
|
||
|
! test -f /srv/example-service-volume-invalid
|
||
|
|
||
|
#
|
||
|
# A --volume option will expose the volume from the docker host to the service
|
||
|
#
|
||
|
volume-on-service:
|
||
|
runs-on: docker
|
||
|
container:
|
||
|
image: debian:bookworm
|
||
|
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid"
|
||
|
|
||
|
services:
|
||
|
myservice:
|
||
|
image: debian:bookworm
|
||
|
options: "--volume /srv/example-service-volume-valid:/srv/example-service-volume-valid"
|
||
|
cmd: ["bash", "-c", "echo -n SUCCESS > /srv/example-service-volume-valid ; sleep infinity"]
|
||
|
|
||
|
steps:
|
||
|
- run: |
|
||
|
set -x
|
||
|
f=/srv/example-service-volume-valid
|
||
|
test -f $f
|
||
|
test $(cat $f) = SUCCESS
|