feat: actions: add LXC backend example (#520)
Without such an example, there is no test that would verify a modification of the ACT LXC backend is working when running a cascading pull request. Trace of the run at: https://code.forgejo.org/forgejo/end-to-end/actions/runs/2433/jobs/2#jobstep-4-28 Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/520 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
16dba44733
commit
429d5584e1
5 changed files with 41 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
7
actions/example-lxc/.forgejo/workflows/test.yml
Normal file
7
actions/example-lxc/.forgejo/workflows/test.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: lxc
|
||||
steps:
|
||||
- run: systemctl --no-pager list-units
|
||||
31
actions/example-lxc/runner-config.yaml
Normal file
31
actions/example-lxc/runner-config.yaml
Normal file
|
|
@ -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:
|
||||
1
actions/example-lxc/setup.sh
Executable file
1
actions/example-lxc/setup.sh
Executable file
|
|
@ -0,0 +1 @@
|
|||
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload
|
||||
1
actions/example-lxc/teardown.sh
Executable file
1
actions/example-lxc/teardown.sh
Executable file
|
|
@ -0,0 +1 @@
|
|||
forgejo-runner.sh reload
|
||||
Loading…
Add table
Add a link
Reference in a new issue