Update to v1.21.1-0
This commit is contained in:
parent
2ac865ad85
commit
42457ae98d
|
@ -27,7 +27,7 @@ The playbook includes postgresql role and deploys entire stack needed to run For
|
||||||
## Customization
|
## Customization
|
||||||
You can deploy custom themes with this role. To do so, uncomment `forgejo_theme_dir` and `forgejo_custom_themes` from `defaults/main.yml`. Add the theme repos' address and name there, enable them and then deploy with `ansible-playbook -b Playbooks/forgejo.yml --tags theme`.
|
You can deploy custom themes with this role. To do so, uncomment `forgejo_theme_dir` and `forgejo_custom_themes` from `defaults/main.yml`. Add the theme repos' address and name there, enable them and then deploy with `ansible-playbook -b Playbooks/forgejo.yml --tags theme`.
|
||||||
|
|
||||||
You can also add you own images like favicon, icons, etc. See https://docs.gitea.io/en-us/customizing-gitea/ to see how to prepare your images.
|
You can also add you own images like favicon, icons, etc. See https://forgejo.org/docs/v1.21/developer/customization/ to see how to prepare your images.
|
||||||
Then, copy them in the `img` folder of this role and uncomment `forgejo_extra_files_path` and `forgejo_theme_dir` from `defaults/main.yml`. You can then deploy with `ansible-playbook -b Playbooks/forgejo.yml --tags config`.
|
Then, copy them in the `img` folder of this role and uncomment `forgejo_extra_files_path` and `forgejo_theme_dir` from `defaults/main.yml`. You can then deploy with `ansible-playbook -b Playbooks/forgejo.yml --tags config`.
|
||||||
|
|
||||||
For more information about customizaton, check https://docs.gitea.io/en-us/customizing-gitea/.
|
For more information about customizaton, check https://forgejo.org/docs/v1.21/developer/customization/
|
||||||
|
|
|
@ -7,7 +7,7 @@ forgejo_group: 'git'
|
||||||
forgejo_confdir: '/etc/forgejo/app.ini'
|
forgejo_confdir: '/etc/forgejo/app.ini'
|
||||||
|
|
||||||
forgejo_flavor: 'forgejo'
|
forgejo_flavor: 'forgejo'
|
||||||
forgejo_version: '1.20.6-0'
|
forgejo_version: '1.21.1-0'
|
||||||
forgejo_arch: 'linux-amd64'
|
forgejo_arch: 'linux-amd64'
|
||||||
#forgejo_download_url: 'https://github.com/go-gitea/gitea/releases/download/v{{ forgejo_version }}/gitea-{{ forgejo_version }}-{{ forgejo_arch }}'
|
#forgejo_download_url: 'https://github.com/go-gitea/gitea/releases/download/v{{ forgejo_version }}/gitea-{{ forgejo_version }}-{{ forgejo_arch }}'
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,18 @@
|
||||||
notify: Restart forgejo
|
notify: Restart forgejo
|
||||||
tags: config
|
tags: config
|
||||||
|
|
||||||
|
- name: "[CONF] - Create assets dir"
|
||||||
|
file:
|
||||||
|
path: "{{ forgejo_theme_dir }}/public/assets/"
|
||||||
|
state: 'directory'
|
||||||
|
owner: '{{ forgejo_user }}'
|
||||||
|
group: '{{ forgejo_group }}'
|
||||||
|
when: forgejo_extra_files_path is defined
|
||||||
|
tags: config
|
||||||
|
|
||||||
- name: "[CONF] - Create img folder"
|
- name: "[CONF] - Create img folder"
|
||||||
file:
|
file:
|
||||||
path: "{{ forgejo_theme_dir }}/public/img/"
|
path: "{{ forgejo_theme_dir }}/public/assets/img/"
|
||||||
state: 'directory'
|
state: 'directory'
|
||||||
owner: '{{ forgejo_user }}'
|
owner: '{{ forgejo_user }}'
|
||||||
group: '{{ forgejo_group }}'
|
group: '{{ forgejo_group }}'
|
||||||
|
@ -57,7 +66,7 @@
|
||||||
- name: "[CONF] - Deploy img folder"
|
- name: "[CONF] - Deploy img folder"
|
||||||
copy:
|
copy:
|
||||||
src: '{{ forgejo_extra_files_path }}/'
|
src: '{{ forgejo_extra_files_path }}/'
|
||||||
dest: "{{ forgejo_theme_dir }}/public/img/"
|
dest: "{{ forgejo_theme_dir }}/public/assets/img/"
|
||||||
owner: "{{ forgejo_user }}"
|
owner: "{{ forgejo_user }}"
|
||||||
group: "{{ forgejo_group }}"
|
group: "{{ forgejo_group }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: '[THEME] - Create public dir'
|
|
||||||
file:
|
|
||||||
path: '{{ forgejo_theme_dir }}/public/'
|
|
||||||
state: directory
|
|
||||||
owner: "{{ forgejo_user }}"
|
|
||||||
group: "{{ forgejo_group }}"
|
|
||||||
tags: theme
|
|
||||||
|
|
||||||
- name: '[THEME] - Create css dir'
|
- name: '[THEME] - Create css dir'
|
||||||
file:
|
file:
|
||||||
path: '{{ forgejo_theme_dir }}/public/css'
|
path: '{{ forgejo_theme_dir }}/public/assets/css'
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ forgejo_user }}"
|
owner: "{{ forgejo_user }}"
|
||||||
group: "{{ forgejo_group }}"
|
group: "{{ forgejo_group }}"
|
||||||
|
@ -19,7 +11,7 @@
|
||||||
# First, remove the css files from public folder, then theme repos
|
# First, remove the css files from public folder, then theme repos
|
||||||
- name: "[THEME] - Remove css files from the css folder"
|
- name: "[THEME] - Remove css files from the css folder"
|
||||||
shell:
|
shell:
|
||||||
cmd: find "{{ forgejo_theme_dir }}/{{ item.name }}" -type f -name "*.css" -printf "%f\n" | xargs -I{} rm public/css/{}
|
cmd: find "{{ forgejo_theme_dir }}/{{ item.name }}" -type f -name "*.css" -printf "%f\n" | xargs -I{} rm public/assets/css/{}
|
||||||
chdir: "{{ forgejo_theme_dir }}"
|
chdir: "{{ forgejo_theme_dir }}"
|
||||||
loop: "{{ forgejo_custom_themes }}"
|
loop: "{{ forgejo_custom_themes }}"
|
||||||
when: item.enable == 'false'
|
when: item.enable == 'false'
|
||||||
|
@ -49,7 +41,7 @@
|
||||||
|
|
||||||
- name: "[THEME] - Find css files from different repos and copy them in the public folder"
|
- name: "[THEME] - Find css files from different repos and copy them in the public folder"
|
||||||
shell:
|
shell:
|
||||||
cmd: find "{{ forgejo_theme_dir }}" -type f -name "*.css" -not -path "{{ forgejo_theme_dir }}/public/*" | xargs cp -t "{{ forgejo_theme_dir }}/public/css"
|
cmd: find "{{ forgejo_theme_dir }}" -type f -name "*.css" -not -path "{{ forgejo_theme_dir }}/public/*" | xargs cp -t "{{ forgejo_theme_dir }}/public/assets/css"
|
||||||
chdir: "{{ forgejo_theme_dir }}"
|
chdir: "{{ forgejo_theme_dir }}"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ forgejo_user }}"
|
become_user: "{{ forgejo_user }}"
|
||||||
|
@ -58,7 +50,7 @@
|
||||||
# Lastly, update app.ini by adding the theme's name list.
|
# Lastly, update app.ini by adding the theme's name list.
|
||||||
- name: "[THEME] - Get and prepare a list for app.ini of css files in public folder, register it"
|
- name: "[THEME] - Get and prepare a list for app.ini of css files in public folder, register it"
|
||||||
shell:
|
shell:
|
||||||
cmd: ls "{{ forgejo_theme_dir }}/public/css" | sed -e 's/theme-//g' | sed -e 's/.css//g' | paste -s -d,
|
cmd: ls "{{ forgejo_theme_dir }}/public/assets/css" | sed -e 's/theme-//g' | sed -e 's/.css//g' | paste -s -d,
|
||||||
chdir: "{{ forgejo_theme_dir }}"
|
chdir: "{{ forgejo_theme_dir }}"
|
||||||
register: theme_name
|
register: theme_name
|
||||||
tags: theme
|
tags: theme
|
||||||
|
|
Loading…
Reference in New Issue