Merge pull request 'actions: verify runner config options for the container' (#463) from earl-warren/end-to-end:wip-config-options into main

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/463
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
earl-warren 2025-01-11 09:58:23 +00:00
commit 5e0b4c6419
5 changed files with 47 additions and 1 deletions

View file

@ -146,7 +146,7 @@ function test_actions() {
done
fi
for example in cache checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context; do
for example in config-options cache checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context; do
run actions_verify_example $example
done

View file

@ -0,0 +1,12 @@
on: [push]
jobs:
test:
runs-on: docker
steps:
- run: |
test -f /srv/example-config-options-volume-valid
- run: |
! test -f /srv/example-config-options-volume-invalid
- run: |
test "$FROB" = "NITZ"

View file

@ -0,0 +1,30 @@
log:
level: debug
runner:
file: .runner
capacity: 1
env_file: .env
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels: ["docker:docker://code.forgejo.org/oci/node:20-bookworm"]
cache:
enabled: false
dir: ""
host: ""
port: 0
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"
workdir_parent:
valid_volumes: ["/srv/example-config-options-volume-valid"]
docker_host: ""
host:
workdir_parent:

View file

@ -0,0 +1,3 @@
>/srv/example-config-options-volume-valid
>/srv/example-config-options-volume-invalid
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload

View file

@ -0,0 +1 @@
forgejo-runner.sh reload