From 3ca16f62a7d718b256983ff628095e901559044f Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sat, 13 Jul 2024 11:34:36 +0500 Subject: [PATCH] Force to update readme and meta.json if action is called manually --- .github/workflows/check-updates.yml | 5 +++++ tools/update-all.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-updates.yml b/.github/workflows/check-updates.yml index c9b278a..9095462 100644 --- a/.github/workflows/check-updates.yml +++ b/.github/workflows/check-updates.yml @@ -6,6 +6,7 @@ on: push: branches: - master + workflow_dispatch: jobs: deploy: @@ -30,6 +31,10 @@ jobs: sudo apt install git-restore-mtime git restore-mtime + - name: Set force environment variable if manually triggered + if: github.event_name == 'workflow_dispatch' + run: echo "FORCE_RENDER=true" >> $GITHUB_ENV + - name: Update plugins list run: npm run update-all working-directory: ./tools diff --git a/tools/update-all.js b/tools/update-all.js index b938ebe..209e338 100644 --- a/tools/update-all.js +++ b/tools/update-all.js @@ -2,7 +2,7 @@ import {render_readme, make_plugins_json, run_update} from './actions.js'; import {get_all_metadata_files} from './helpers.js'; const metadata_files = get_all_metadata_files(); -if (await run_update(metadata_files)) { +if (await run_update(metadata_files) || process.env.FORCE_RENDER !== undefined) { render_readme().then(); make_plugins_json().then(); }