docker-gitea-act-runner icon indicating copy to clipboard operation
docker-gitea-act-runner copied to clipboard

Specify valid volumes for folders in the container

Open my1e5 opened this issue 8 months ago • 0 comments

I'm using a DIND approach. My understanding was that GITEA_RUNNER_VALID_VOLUME_N would allow me to specify volumes in the parent docker container that the runner docker containers could use.

For example, if I try to mount a volume within my action yaml I get [foo] is not a valid volume, will be ignored. (Related https://github.com/vegardit/docker-gitea-act-runner/issues/54)

jobs:
  ci:
    runs-on: ubuntu-latest
    container:
      volumes:
        - /foo:/foo"

So I figured I need to use GITEA_RUNNER_VALID_VOLUME_N. But when I try that it seems to use a path from my Windows host machine?

docker run \
   -e GITEA_INSTANCE_URL=https://gitea.example.com \
   -e GITEA_RUNNER_REGISTRATION_TOKEN=<INSERT_TOKEN_HERE> \
   -e GITEA_RUNNER_VALID_VOLUME_1=/foo \
   --name gitea_act_runner \
   --privileged
   vegardit/gitea-act-runner:dind-latest
2024-06-04 12:30:30  - GITEA_RUNNER_CONFIG_TEMPLATE_FILE=/opt/config.template.yaml
2024-06-04 12:30:30  - GITEA_RUNNER_GID=1000
2024-06-04 12:30:30  - GITEA_RUNNER_LABELS=
2024-06-04 12:30:30  - GITEA_RUNNER_LABELS_DEFAULT=ubuntu-latest:docker://catthehacker/ubuntu:act-22.04,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04,ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04
2024-06-04 12:30:30  - GITEA_RUNNER_NAME=
2024-06-04 12:30:30  - GITEA_RUNNER_REGISTRATION_RETRY_INTERVAL=5s
2024-06-04 12:30:30  - GITEA_RUNNER_REGISTRATION_TIMEOUT=30
2024-06-04 12:30:30  - GITEA_RUNNER_REGISTRATION_TOKEN=******
2024-06-04 12:30:30  - GITEA_RUNNER_UID=1000
2024-06-04 12:30:30  - GITEA_RUNNER_VALID_VOLUME_1=C:/Program Files/Git/foo

Notice the C:/Program Files/Git/foo.

So I still get [foo] is not a valid volume, will be ignored when I try run my action.

Am I doing something wrong?

my1e5 avatar Jun 04 '24 12:06 my1e5