Skip to content

Commit

Permalink
act runner : increase # concurrent jobs, force cache to /stuff/gitea/…
Browse files Browse the repository at this point in the history
…act_cache
  • Loading branch information
Halfwalker committed Jan 27, 2024
1 parent 6492a50 commit 9b83966
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Available variables are listed below along with default values (see `defaults/ma

**TODO:** Move to a container for the act_runner like gitea, drone and drone-runner.

* `gitea_act_version: 0.2.6`

Which version of the Gitea ACT runner to install

* `gitea_act_capacity: 10`

How many concurrent jobs this ACT runner instance can handle

* `gitea_container_port: 3000`
`gitea_drone_port: 3001`
`gitea_dronerunner_port: 3002`
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ enable_drone: true
enable_act: true
# What version to install
gitea_act_version: 0.2.6
# act runner container capacity - how many concurrent jobs
gitea_act_capacity: 10

# Docker network name for gitea/drone/drone-runner to live in
gitea_network_name: ci-cd
Expand Down
8 changes: 6 additions & 2 deletions tasks/act_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@
- name: act - Set container default to allow privileged
replace:
dest: '{% for dataset in gitea_datasets %}{% if dataset.name == "gitea" %}{{ dataset.mountpoint }}{% endif %}{% endfor %}/act_runner-{{ gitea_act_version }}_config.yml'
regexp: 'privileged: false'
replace: 'privileged: true'
regexp: "{{ item.regexp }}"
replace: "{{ item.replace }}"
loop:
- { regexp: 'privileged: false', replace: 'privileged: true' }
- { regexp: 'dir: ""', replace: 'dir: "{% for dataset in gitea_datasets %}{% if dataset.name == "gitea" %}{{ dataset.mountpoint }}{% endif %}{% endfor %}/act_cache"' }
- { regexp: 'capacity: .*', replace: 'capacity: {{ gitea_act_capacity }}' }

- name: act - check for existence of .runner config
stat:
Expand Down

0 comments on commit 9b83966

Please sign in to comment.