feat: Github Actions to Avoid PR Conflicts (#497)

* remove .env file

* remove dotenv, move json dir

* fix: create dir if not exists

* test actions

* fix: specific branch

* test double commit

* fix: only add dist dir

* cleanup

* test push without updating json

* test actions without plugins diff

* plugins: update json files for new plugins (#7)

* test without config.json

* plugins: update json files for new plugins (#8)

* fix: ordering in Win is not the same as Linux

* plugins: update json files for new plugins (#10)

* test no update

* test: create PR if there're changes

* fix: wrong path

* test: if there're changes

* fix: wrong operator

* fix: assign boolean to github output

* plugins: update json files for new plugins (#13)

* clean up and update README

* clean up

* last cleant up xD
This commit is contained in:
nyagami
2023-05-16 22:39:22 +07:00
committed by GitHub
parent 8522c89195
commit 6bc3900d30
14 changed files with 419 additions and 349 deletions
+1 -8
View File
@@ -3,11 +3,6 @@ const languages = require('@libs/languages');
const path = require('path')
const root = path.dirname(require.main.filename);
const githubIconsLink = 'https://raw.githubusercontent.com/nyagami/plugins/main/icons';
const githubIconSuffix = '?raw=true';
const githubPluginsLink = 'https://raw.githubusercontent.com/nyagami/plugins/main/plugins';
const githubPluginSuffix = '?newtest=true';
const all_plugins = () => {
const res = {}
for (let language in languages) { //language with English name
@@ -19,10 +14,8 @@ const all_plugins = () => {
if(plugin.startsWith('.')) return;
const requirePath = `@plugins/${language.toLowerCase()}/${plugin.split('.')[0]}`
const instance = require(requirePath);
const { id, name, lang, version, icon, description } = instance;
const { id, name, lang, version, description } = instance;
const info = { id, name, lang, version, description } // lang: language with native name
info.url = `${githubPluginsLink}/${language.toLowerCase()}/${plugin}${githubPluginSuffix}`;
info.iconUrl = `${githubIconsLink}/${icon}${githubIconSuffix}`;
info.requirePath = requirePath;
res[lang].push(info);
});