Skip to content

Commit

Permalink
Merge pull request #151 from pat-s/fix-public-assets
Browse files Browse the repository at this point in the history
Fix public assets path for Gitea 1.21+
  • Loading branch information
DO1JLR authored Mar 4, 2024
2 parents 01afa51 + 25319bf commit 9a0b46c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
21 changes: 11 additions & 10 deletions tasks/customize_logo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,52 @@
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: 'u=rwX,g=rX,o='
mode: "u=rwX,g=rX,o="
loop:
- "{{ gitea_custom }}/public"
- "{{ gitea_custom }}/public/img"
- "{{ gitea_custom }}/public/assets"
- "{{ gitea_custom }}/public/assets/img"

- name: Transfer custom logo.svg
become: true
ansible.builtin.copy:
src: "{{ lookup('first_found', transfer_custom_logo_logosvg) }}"
dest: "{{ gitea_custom }}/public/img/logo.svg"
dest: "{{ gitea_custom }}/public/assets/img/logo.svg"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0644'
mode: "0644"
tags: skip_ansible_lint
failed_when: false

- name: Transfer custom logo.png
become: true
ansible.builtin.copy:
src: "{{ lookup('first_found', transfer_custom_logo_logopng) }}"
dest: "{{ gitea_custom }}/public/img/logo.png"
dest: "{{ gitea_custom }}/public/assets/img/logo.png"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0644'
mode: "0644"
tags: skip_ansible_lint
failed_when: false

- name: Transfer custom favicon.png
become: true
ansible.builtin.copy:
src: "{{ lookup('first_found', transfer_custom_logo_faviconpng) }}"
dest: "{{ gitea_custom }}/public/img/favicon.png"
dest: "{{ gitea_custom }}/public/assets/img/favicon.png"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0644'
mode: "0644"
tags: skip_ansible_lint
failed_when: false

- name: Transfer custom apple-touch-icon.png
become: true
ansible.builtin.copy:
src: "{{ lookup('first_found', transfer_custom_logo_appletouchiconpng) }}"
dest: "{{ gitea_custom }}/public/img/apple-touch-icon.png"
dest: "{{ gitea_custom }}/public/assets/img/apple-touch-icon.png"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0644'
mode: "0644"
tags: skip_ansible_lint
failed_when: false
8 changes: 4 additions & 4 deletions tasks/customize_public_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
state: directory
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: 'u=rwX,g=rX,o='
mode: "u=rwX,g=rX,o="
loop:
- "{{ gitea_custom }}/public"
- "{{ gitea_custom }}/public/assets/"

- name: Transfer custom public web data
become: true
ansible.builtin.copy:
src: "{{ gitea_customize_files_path }}"
dest: "{{ gitea_custom }}/public/"
dest: "{{ gitea_custom }}/public/assets/"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
directory_mode: true
mode: 'u=rwX,g=rX,o='
mode: "u=rwX,g=rX,o="
failed_when: false
tags: skip_ansible_lint
notify: "Restart gitea"

0 comments on commit 9a0b46c

Please sign in to comment.