From dc77f764a510298ccfa525cfb7afec8d8ddfce04 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Mon, 8 May 2023 07:26:17 +0200 Subject: [PATCH 1/4] feat(actions): Set default values for gitea actions related variables. --- defaults/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 37e8bd8..c38e904 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -227,6 +227,10 @@ gitea_lfs_serve_direct: false gitea_lfs_content_path: "{{ gitea_home }}/data/lfs" gitea_lfs_extra: '' +# Actions (actions) +# -> https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions +gitea_actions_enabled: false +gitea_actions_default_actions_url: "https://gitea.com" # Other (other) # -> https://docs.gitea.io/en-us/config-cheat-sheet/#other-other gitea_other_show_footer_branding: false From 8f06e948fb108ade04dc12beb84ab84d32f87eb9 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Mon, 8 May 2023 07:27:56 +0200 Subject: [PATCH 2/4] feat(actions): Add actions related elements to the configuration template. --- templates/gitea.ini.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index eed51a1..a105a41 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -271,6 +271,14 @@ PATH = {{ gitea_lfs_content_path }} {% endif %} ; ; +{% if gitea_actions_enabled | bool %} +; -> https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions +[actons] +ENABLED = {{ gitea_actions_enabled }} +DEFAULT_ACTIONS_URL = {{ gitea_actions_default_actions_url }} +{% endif %} +; +; ; Other (other) ; -> https://docs.gitea.io/en-us/config-cheat-sheet/#other-other [other] From 0ea40a223f9312d362b52687f754f1f0857738d9 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Mon, 8 May 2023 07:28:37 +0200 Subject: [PATCH 3/4] feat(actions): Add documentation related to actions in the README file. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2048806..a71a53d 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,12 @@ Either you define exactly which release you install. Or you use the option ``lat | `gitea_lfs_content_path` | `{{ gitea_home }}/data/lfs` | Where to store LFS files | | `gitea_lfs_extra` ||you can use this variable to pass additional config parameters in the `[lfs]` section of the config. | +### Actions ([actions](https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions)) +| variable name | default value | description | +| ------------- | ------------- | ----------- | +| `gitea_actions_enabled` | `false` | Enable/Disable actions capabilities globaly. You may want to add `repo.actions` to `gitea_default_repo_units` to enable actions on all new repositories | +| `gitea_actions_default_actions_url` | `https://gitea.com/` | Default address to get action plugins, e.g. the default value means downloading from `https://gitea.com/actions/checkout` for `uses: actions/checkout@v3` | + ### Other ([other](https://docs.gitea.io/en-us/config-cheat-sheet/#other-other)) | variable name | default value | description | | ------------- | ------------- | ----------- | From 3f4f8f52acb737457661bd799142a8b4fc75e07c Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 9 May 2023 01:43:05 +0200 Subject: [PATCH 4/4] adding gitea_actions_extra variable + Added the variable ``gitea_actions_extra`` + Increased the Number for the simplified versions check --- README.md | 3 ++- defaults/main.yml | 2 ++ templates/gitea.ini.j2 | 1 + vars/main.yml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a71a53d..4fac809 100644 --- a/README.md +++ b/README.md @@ -293,13 +293,14 @@ Either you define exactly which release you install. Or you use the option ``lat | `gitea_lfs_storage_type` | `local` | Storage type for lfs | | `gitea_lfs_serve_direct` | `false` | Allows the storage driver to redirect to authenticated URLs to serve files directly. *(only Minio/S3)* | | `gitea_lfs_content_path` | `{{ gitea_home }}/data/lfs` | Where to store LFS files | -| `gitea_lfs_extra` ||you can use this variable to pass additional config parameters in the `[lfs]` section of the config. | +| `gitea_lfs_extra` | | you can use this variable to pass additional config parameters in the `[lfs]` section of the config. | ### Actions ([actions](https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions)) | variable name | default value | description | | ------------- | ------------- | ----------- | | `gitea_actions_enabled` | `false` | Enable/Disable actions capabilities globaly. You may want to add `repo.actions` to `gitea_default_repo_units` to enable actions on all new repositories | | `gitea_actions_default_actions_url` | `https://gitea.com/` | Default address to get action plugins, e.g. the default value means downloading from `https://gitea.com/actions/checkout` for `uses: actions/checkout@v3` | +| `gitea_actions_extra` | | you can use this variable to pass additional config parameters in the `[actions]` section of the config. | ### Other ([other](https://docs.gitea.io/en-us/config-cheat-sheet/#other-other)) | variable name | default value | description | diff --git a/defaults/main.yml b/defaults/main.yml index c38e904..98ffff5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -231,6 +231,8 @@ gitea_lfs_extra: '' # -> https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions gitea_actions_enabled: false gitea_actions_default_actions_url: "https://gitea.com" +gitea_actions_extra: '' + # Other (other) # -> https://docs.gitea.io/en-us/config-cheat-sheet/#other-other gitea_other_show_footer_branding: false diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index a105a41..8b10b22 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -276,6 +276,7 @@ PATH = {{ gitea_lfs_content_path }} [actons] ENABLED = {{ gitea_actions_enabled }} DEFAULT_ACTIONS_URL = {{ gitea_actions_default_actions_url }} +{{ gitea_actions_extra }} {% endif %} ; ; diff --git a/vars/main.yml b/vars/main.yml index a73b653..f14adbd 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -62,5 +62,5 @@ transfer_custom_footer: - 'files/gitea_footer/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl' -playbook_version_number: 44 # should be int +playbook_version_number: 45 # should be int playbook_version_path: 'do1jlr.gitea.version'