From 07b9318ff7003e3646313c753cc04fd9eeb7207b Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 2 Jul 2025 10:54:26 +0000 Subject: [PATCH] actions: config-options: mount read-only (#718) To illustrate (partially) [this feature request](https://code.forgejo.org/forgejo/runner/issues/79#issuecomment-43844) Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/718 Reviewed-by: Michael Kriese Co-authored-by: Earl Warren Co-committed-by: Earl Warren --- actions/example-config-options/.forgejo/workflows/test.yml | 2 ++ actions/example-config-options/runner-config.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/example-config-options/.forgejo/workflows/test.yml b/actions/example-config-options/.forgejo/workflows/test.yml index 63bbc212..7845e441 100644 --- a/actions/example-config-options/.forgejo/workflows/test.yml +++ b/actions/example-config-options/.forgejo/workflows/test.yml @@ -8,6 +8,8 @@ jobs: steps: - run: | test -f /srv/example-config-options-volume-valid + - run: | + ! test -w /srv/example-config-options-volume-valid - run: | ! test -f /srv/example-config-options-volume-invalid - run: | diff --git a/actions/example-config-options/runner-config.yaml b/actions/example-config-options/runner-config.yaml index ec5d1c5d..37b7b0ae 100644 --- a/actions/example-config-options/runner-config.yaml +++ b/actions/example-config-options/runner-config.yaml @@ -24,7 +24,7 @@ cache: container: network: "" privileged: false - options: "--volume /srv/example-config-options-volume-valid:/srv/example-config-options-volume-valid --volume /srv/example-config-options-volume-invalid:/srv/example-config-options-volume-invalid --env FROB=NITZ" + options: "--volume /srv/example-config-options-volume-valid:/srv/example-config-options-volume-valid:ro --volume /srv/example-config-options-volume-invalid:/srv/example-config-options-volume-invalid --env FROB=NITZ" workdir_parent: valid_volumes: ["/srv/example-config-options-volume-valid"] docker_host: ""