gitea: added act runner

This commit is contained in:
2024-11-22 20:10:41 -06:00
parent c9cd0c3c12
commit 1acd6411cb
7 changed files with 152 additions and 2 deletions

View File

@@ -17,6 +17,10 @@
gitea_require_signin: false
gitea_lfs_server_enabled: true
- name: "Start Gitea Act Runner"
include_tasks: runner.yml
when: giteaRunnerToken is defined
- name: Backup db
include_tasks: backup.yml
tags:

View File

@@ -0,0 +1,27 @@
- name: Make dirs for runner
file:
path: "{{ item }}"
state: directory
loop:
- "{{ runnerPath }}"
- "{{ runnerPath }}/data"
- name: Copy docker-compose.yml to server
template:
src: ./templates/runner-docker-compose.yml
dest: "{{ runnerPath }}/docker-compose.yml"
- name: Copy runner.env to server
template:
src: ./templates/runner.env
dest: "{{ runnerPath }}/runner.env"
- name: Copy runner-config.yml to server
copy:
src: ./files/runner-config.yml
dest: "{{ runnerPath }}/config.yaml"
- name: Start Gitea runner service
community.docker.docker_compose_v2:
project_src: "{{ runnerPath }}"
state: present