From 4452e746977b49946a91621a731ec5bd69ab7428 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 18 Mar 2022 09:37:18 +0100 Subject: [PATCH 01/13] add language --- conf/.env | 2 +- manifest.json | 10 ++++++++++ scripts/install | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 96261964..4a6a7635 100644 --- a/conf/.env +++ b/conf/.env @@ -16,7 +16,7 @@ PF_MAX_USERS=1000 OAUTH_ENABLED=true APP_TIMEZONE=UTC -APP_LOCALE=en +APP_LOCALE=__LANGUAGE__ ## Pixelfed Tweaks LIMIT_ACCOUNT_SIZE=true diff --git a/manifest.json b/manifest.json index c81ffa95..6430041a 100644 --- a/manifest.json +++ b/manifest.json @@ -46,6 +46,16 @@ "name": "is_public", "type": "boolean", "default": true + }, + { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["fr", "en"], + "default": "fr" } ] } diff --git a/scripts/install b/scripts/install index 68e7eb48..4854b8be 100644 --- a/scripts/install +++ b/scripts/install @@ -29,6 +29,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app_key="base64:$(ynh_string_random --length=32 | base64)" +language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -51,6 +52,7 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=app_key --value=$app_key +ynh_app_setting_set --app=$app --key=language --value=$language #================================================= # STANDARD MODIFICATIONS From d40911d28d6137e7c643308077d9ec6b11169feb Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 18 Mar 2022 10:22:16 +0100 Subject: [PATCH 02/13] Add more languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Deutsch, Italian, Arabic, Russian, Portuguese, Chinese (Continental + Taiwan) (I tried 20 of them, here is the list of the ones working on my instance… I don't know why it fails for the other) --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6430041a..d73214aa 100644 --- a/manifest.json +++ b/manifest.json @@ -54,7 +54,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["fr", "en"], + "choices": ["fr","en","de","it","ar","ru","pt","zh-cn","zh-tw"], "default": "fr" } ] From 3957dc7b68bcf760ae1e6b18132223314d80459e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 18 Mar 2022 16:40:13 +0100 Subject: [PATCH 03/13] Revert "Add language" --- conf/.env | 2 +- manifest.json | 10 ---------- scripts/install | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/conf/.env b/conf/.env index 4a6a7635..96261964 100644 --- a/conf/.env +++ b/conf/.env @@ -16,7 +16,7 @@ PF_MAX_USERS=1000 OAUTH_ENABLED=true APP_TIMEZONE=UTC -APP_LOCALE=__LANGUAGE__ +APP_LOCALE=en ## Pixelfed Tweaks LIMIT_ACCOUNT_SIZE=true diff --git a/manifest.json b/manifest.json index d73214aa..c81ffa95 100644 --- a/manifest.json +++ b/manifest.json @@ -46,16 +46,6 @@ "name": "is_public", "type": "boolean", "default": true - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": ["fr","en","de","it","ar","ru","pt","zh-cn","zh-tw"], - "default": "fr" } ] } diff --git a/scripts/install b/scripts/install index 4854b8be..68e7eb48 100644 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app_key="base64:$(ynh_string_random --length=32 | base64)" -language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -52,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=app_key --value=$app_key -ynh_app_setting_set --app=$app --key=language --value=$language #================================================= # STANDARD MODIFICATIONS From 4a6ea627441ea94752a251b36f7b4488a9fb1a83 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 12 Apr 2022 23:58:01 +0200 Subject: [PATCH 04/13] missing redis_db --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 06262450..7c21d622 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,6 +22,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) +redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) #================================================= # STANDARD REMOVE From 6e2f4d89278ed3f12d42eb7906f2806665c04886 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 17 Apr 2022 16:56:59 +0200 Subject: [PATCH 05/13] Fix .env permission (admin panel access to the config file) --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 68e7eb48..e668393e 100644 --- a/scripts/install +++ b/scripts/install @@ -100,6 +100,8 @@ ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +# Pixelfed app should be able to edit its settings from the admin panel +chmod 600 "$final_path"/.env #================================================= # NGINX CONFIGURATION From 695f1059b4bf6b9eb6cc6e5fd3da015314e8e57f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 17 Apr 2022 17:00:25 +0200 Subject: [PATCH 06/13] Fix .env permission (admin panel access to the config file) --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f2933c51..70a5c09b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -163,6 +163,9 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +# Pixelfed app should be able to edit its settings from the admin panel +chmod 600 "$final_path"/.env + #================================================= # NGINX CONFIGURATION From 0f8268bc09488dae37313695efc5c28e96a4e344 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 19 Apr 2022 20:22:13 +0200 Subject: [PATCH 07/13] `.env` permission : fix syntax --- scripts/install | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index e668393e..bf0cd7fa 100644 --- a/scripts/install +++ b/scripts/install @@ -100,8 +100,6 @@ ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -# Pixelfed app should be able to edit its settings from the admin panel -chmod 600 "$final_path"/.env #================================================= # NGINX CONFIGURATION @@ -145,7 +143,8 @@ ynh_script_progression --message="Adding a config file..." ynh_add_config --template="../conf/.env" --destination="$final_path/.env" -chmod 400 "$final_path/.env" +# Pixelfed app should be able to edit its settings from the admin panel +chmod 600 "$final_path/.env" chown $app:$app "$final_path/.env" #================================================= From cd365fc208fba69d8cfa659e70d0f11d17964df5 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 10 May 2022 21:02:06 +0200 Subject: [PATCH 08/13] v0.11.3 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c81ffa95..4187cf56 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub Federated Image Sharing", "fr": "Logiciel de partage d'image fédéré via ActivityPub" }, - "version": "0.11.2~ynh1", + "version": "0.11.3~ynh1", "url": "https://pixelfed.org/", "upstream": { "license": "AGPL-3.0-or-later", From 00fc2012e0aab2596ab038ba693dcd176dfef299 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 May 2022 19:02:09 +0000 Subject: [PATCH 09/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ccb879a5..3da0faa8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ In addition to taking over the functionality of Instagram, the functioning of Pi It is also possible to import your data from Instagram. -**Shipped version:** 0.11.2~ynh1 +**Shipped version:** 0.11.3~ynh1 diff --git a/README_fr.md b/README_fr.md index 67bb3ae5..bd89057b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ En plus de reprendre les fonctionnalités d'Instagram, le fonctionnement de Pixe Il est également possible d'importer ses données depuis Instagram. -**Version incluse :** 0.11.2~ynh1 +**Version incluse :** 0.11.3~ynh1 From bb3b23bc495b1c3c20d71e9b043b93baf4d5b684 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 10 May 2022 21:02:47 +0200 Subject: [PATCH 10/13] v0.11.3 --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index e4a4d124..674e6a7e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.2.tar.gz -SOURCE_SUM=04eca99fa8a725ae97cf01ad8c8b26b28f02a2b579dcff9320a172433afe0de2 +SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.3.tar.gz +SOURCE_SUM=cbe5b878e8afcbc5d3e6219ed061e7c98dc7c2c5a2d5925d49ae9cfcdca71d30 OURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From 5b7ba83e45ec3ffa43cd2b8d09bbe81ec4eeb146 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 May 2022 23:08:59 +0200 Subject: [PATCH 11/13] Update check_process --- check_process | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/check_process b/check_process index f2a27629..cac92289 100644 --- a/check_process +++ b/check_process @@ -29,11 +29,13 @@ # 0.10.10~ynh4 # upgrade=1 from_commit=8ef41895fbd38008f3718e164d0bf3f0d97a2c03 # 0.11.0~ynh1 - upgrade=1 from_commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a + # upgrade=1 from_commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a # 0.11.0~ynh2 - upgrade=1 from_commit=d85b0b112afd19313dbf4cfba954e255789dfb88 + # upgrade=1 from_commit=d85b0b112afd19313dbf4cfba954e255789dfb88 # 0.11.1~ynh2 upgrade=1 from_commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332 + # 0.11.2~ynh1 + upgrade=1 from_commit=7a4833633f76d050296c783e565f8cdfc913c75a backup_restore=1 multi_instance=1 port_already_use=0 @@ -41,24 +43,3 @@ ;;; Options Email=yalh@yahoo.com Notification=all -;;; Upgrade options - ; commit=10c3703567d1e9504ea4f298778464c7dd561470 - name=0.10.8 - ; commit=8c5e710060da43a946336d66a30b9c311cfdbc37 - name=0.10.9~ynh1 - ; commit=c81ed6b760a1a68b8993917e808434166766a37a - name=0.10.9~ynh2 - ; commit=9c7d0ff114bb0bd3482901fde4bd82b494aa2e6d - name=0.10.9~ynh3 - ; commit=1aa406fb124b92f03b1bb69fc3462936d5227278 - name=0.10.10~ynh1 - ; commit=2a796e30dd521a5022586bc7fe59d189210028a4 - name=0.10.10~ynh3 - ; commit=8ef41895fbd38008f3718e164d0bf3f0d97a2c03 - name=0.10.10~ynh4 - ; commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a - name=0.11.0~ynh1 - ; commit=d85b0b112afd19313dbf4cfba954e255789dfb88 - name=0.11.0~ynh2 - ; commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332 - name=0.11.1~ynh2 From 9cc137f833680505a75aab7f79a75e55ff6dd811 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 24 May 2022 21:09:05 +0000 Subject: [PATCH 12/13] Auto-update README --- README.md | 23 +++++++++++------------ README_fr.md | 29 ++++++++++++++++------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 3da0faa8..e6a4d08a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Pixelfed for YunoHost -[![Integration level](https://dash.yunohost.org/integration/pixelfed.svg)](https://dash.yunohost.org/appci/app/pixelfed) ![](https://ci-apps.yunohost.org/ci/badges/pixelfed.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pixelfed.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/pixelfed.svg)](https://dash.yunohost.org/appci/app/pixelfed) ![Working status](https://ci-apps.yunohost.org/ci/badges/pixelfed.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/pixelfed.maintain.svg) [![Install Pixelfed with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pixelfed) *[Lire ce readme en français.](./README_fr.md)* @@ -26,11 +26,9 @@ It is also possible to import your data from Instagram. **Shipped version:** 0.11.3~ynh1 - - ## Screenshots -![](./doc/screenshots/screenshots.jpg) +![Screenshot of Pixelfed](./doc/screenshots/screenshots.jpg) ## Disclaimers / important information @@ -67,22 +65,23 @@ Since 0.10.10, by default `/discover/places/`, `/stories/` and `/i/` are present ## Documentation and resources -* Official app website: https://pixelfed.org/ -* Official user documentation: https://docs.pixelfed.org/ -* Official admin documentation: https://docs.pixelfed.org/running-pixelfed/administration.html -* Upstream app code repository: https://github.com/pixelfed/pixelfed -* YunoHost documentation for this app: https://yunohost.org/app_pixelfed -* Report a bug: https://github.com/YunoHost-Apps/pixelfed_ynh/issues +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug or sudo yunohost app upgrade pixelfed -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index bd89057b..8387aa06 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Pixelfed pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/pixelfed.svg)](https://dash.yunohost.org/appci/app/pixelfed) ![](https://ci-apps.yunohost.org/ci/badges/pixelfed.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pixelfed.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/pixelfed.svg)](https://dash.yunohost.org/appci/app/pixelfed) ![Status du fonctionnement](https://ci-apps.yunohost.org/ci/badges/pixelfed.status.svg) ![Status de maintenance](https://ci-apps.yunohost.org/ci/badges/pixelfed.maintain.svg) [![Installer Pixelfed avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pixelfed) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Pixelfed rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -23,11 +27,9 @@ Il est également possible d'importer ses données depuis Instagram. **Version incluse :** 0.11.3~ynh1 - - ## Captures d'écran -![](./doc/screenshots/screenshots.jpg) +![Capture d'écran de Pixelfed](./doc/screenshots/screenshots.jpg) ## Avertissements / informations importantes @@ -64,22 +66,23 @@ Depuis la 0.10.10, par défaut `/discover/places/`, `/stories/` et `/i/` sont pr ## Documentations et ressources -* Site officiel de l'app : https://pixelfed.org/ -* Documentation officielle utilisateur : https://docs.pixelfed.org/ -* Documentation officielle de l'admin : https://docs.pixelfed.org/running-pixelfed/administration.html -* Dépôt de code officiel de l'app : https://github.com/pixelfed/pixelfed -* Documentation YunoHost pour cette app : https://yunohost.org/app_pixelfed -* Signaler un bug : https://github.com/YunoHost-Apps/pixelfed_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug ou sudo yunohost app upgrade pixelfed -u https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From b69cbfb05bdf2d44ab812c3db2e4c3229cde1ce2 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 May 2022 23:15:45 +0200 Subject: [PATCH 13/13] Fix updater --- .github/workflows/updater.sh | 36 +++++-------------------- .github/workflows/updater.yml | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 525ef97f..94afbdf6 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -9,9 +9,6 @@ # Since each app is different, maintainers can adapt its contents so as to perform # automatic actions when a new upstream release is detected. -# Remove this exit command when you are ready to run this Action -#exit 1 - #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS #================================================= @@ -21,7 +18,7 @@ current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) +assets="https://github.com/pixelfed/pixelfed/archive/refs/tags/$version.tar.gz" # Later down the script, we assume the version has only digits and dots # Sometimes the release name starts with a "v", so let's filter it out. @@ -34,6 +31,7 @@ fi echo "Current version: $current_version" echo "Latest release from upstream: $version" echo "VERSION=$version" >> $GITHUB_ENV +echo "REPO=$repo" >> $GITHUB_ENV # For the time being, let's assume the script will fail echo "PROCEED=false" >> $GITHUB_ENV @@ -47,32 +45,16 @@ elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY. exit 0 fi -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - #================================================= # UPDATE SOURCE FILES #================================================= -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do +# Let's download source tarball +asset_url=$assets echo "Handling asset at $asset_url" -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - v"*".tar.gz) v0.11.1.tar.gz - src="app" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then +src="app" # Create the temporary directory tempdir="$(mktemp -d)" @@ -99,16 +81,10 @@ SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=$extension SOURCE_IN_SUBDIR=true -SOURCE_EXTRACT=true +SOURCE_FILENAME= EOT echo "... conf/$src.src updated" -else -echo "... asset ignored" -fi - -done - #================================================= # SPECIFIC UPDATE STEPS #================================================= diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 00000000..5f1dcc17 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,50 @@ +# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. +# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. +# This file should be enough by itself, but feel free to tune it to your needs. +# It calls updater.sh, which is where you should put the app-specific update steps. +name: Check for new upstream releases +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it every day at 6:00 UTC + schedule: + - cron: '0 6 * * *' +jobs: + updater: + runs-on: ubuntu-latest + steps: + - name: Fetch the source code + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run the updater script + id: run_updater + run: | + # Setting up Git user + git config --global user.name 'yunohost-bot' + git config --global user.email 'yunohost-bot@users.noreply.github.com' + # Run the updater script + /bin/bash .github/workflows/updater.sh + - name: Commit changes + id: commit + if: ${{ env.PROCEED == 'true' }} + run: | + git commit -am "Upgrade to v$VERSION" + - name: Create Pull Request + id: cpr + if: ${{ env.PROCEED == 'true' }} + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update to version ${{ env.VERSION }} + committer: 'yunohost-bot ' + author: 'yunohost-bot ' + signoff: false + base: testing + branch: ci-auto-update-v${{ env.VERSION }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + draft: false +