diff --git a/actions/actions.sh b/actions/actions.sh index e62debf4..0b505080 100755 --- a/actions/actions.sh +++ b/actions/actions.sh @@ -143,7 +143,7 @@ function test_actions() { done fi - for example in echo config-options cache checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context; do + for example in echo lxc 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 diff --git a/actions/example-lxc/.forgejo/workflows/test.yml b/actions/example-lxc/.forgejo/workflows/test.yml new file mode 100644 index 00000000..da81c6ea --- /dev/null +++ b/actions/example-lxc/.forgejo/workflows/test.yml @@ -0,0 +1,7 @@ +on: [push] + +jobs: + build: + runs-on: lxc + steps: + - run: systemctl --no-pager list-units diff --git a/actions/example-lxc/runner-config.yaml b/actions/example-lxc/runner-config.yaml new file mode 100644 index 00000000..6698ed20 --- /dev/null +++ b/actions/example-lxc/runner-config.yaml @@ -0,0 +1,31 @@ + +log: + level: debug + job_level: debug + +runner: + file: .runner + capacity: 1 + env_file: .env + timeout: 3h + insecure: false + fetch_timeout: 5s + fetch_interval: 2s + labels: ["lxc:lxc://debian:bookworm:docker"] + +cache: + enabled: false + dir: "" + host: "" + port: 0 + +container: + network: "bridge" + privileged: false + options: + workdir_parent: + valid_volumes: ["/srv/example"] + docker_host: "" + +host: + workdir_parent: diff --git a/actions/example-lxc/setup.sh b/actions/example-lxc/setup.sh new file mode 100755 index 00000000..9c1f5adf --- /dev/null +++ b/actions/example-lxc/setup.sh @@ -0,0 +1 @@ +FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload diff --git a/actions/example-lxc/teardown.sh b/actions/example-lxc/teardown.sh new file mode 100755 index 00000000..b410c513 --- /dev/null +++ b/actions/example-lxc/teardown.sh @@ -0,0 +1 @@ +forgejo-runner.sh reload