From 0fa3841f5f335e97d6b09a9aa6d7c6ccdce7fbd4 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 2 Jun 2024 12:04:50 +0200 Subject: gitea allow forgejo --- roles/gitea/tasks/main.yml | 9 +++++++++ roles/gitea/tasks/update.yml | 14 ++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'roles/gitea/tasks') diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index 77391ec..0d49cf3 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -64,6 +64,15 @@ method: GET return_content: yes register: gitea_sha256_raw + when: not gitea_use_forgejo + +- name: pull forgejo sha256sum + uri: + url: 'https://codeberg.org/forgejo/forgejo/releases/download/v{{ gitea.version.ver }}/forgejo-{{ gitea.version.ver }}-linux-amd64.sha256' + method: GET + return_content: yes + register: gitea_sha256_raw + when: gitea_use_forgejo - name: set sha256sum set_fact: diff --git a/roles/gitea/tasks/update.yml b/roles/gitea/tasks/update.yml index 46538ae..ae6fe1f 100644 --- a/roles/gitea/tasks/update.yml +++ b/roles/gitea/tasks/update.yml @@ -21,3 +21,17 @@ become: yes notify: - Handle systemd + when: not gitea_use_forgejo + +- name: Download forgejo + get_url: + url: 'https://codeberg.org/forgejo/forgejo/releases/download/v{{ gitea.version.ver }}/forgejo-{{ gitea.version.ver }}-linux-amd64' + checksum: 'sha256:{{ gitea_sha256 }}' + dest: /usr/local/bin/gitea + owner: root + group: root + mode: '755' + become: yes + notify: + - Handle systemd + when: gitea_use_forgejo -- cgit v1.2.3