Less changes in PR (#724)
* remove .js dir * update .gitigore * remove .dist * fix: remove EOL * clean up json_plugins * add host bash file * fix: no need to run json * add all files after merge * fix: remove run json from pre-commit * fix: not need to run git in npm json * add delay to debug * fix: git add command * fix: typo * update github actions * fix: missing checkout action * fix: make .sh executable * update readme * fix: git config * fix: action condition
This commit is contained in:
@@ -18,12 +18,4 @@ jobs:
|
||||
run: npm install
|
||||
|
||||
- name: Typescript checking
|
||||
run: |
|
||||
cat > config.json << EOF
|
||||
{
|
||||
"githubUsername": "LNReader",
|
||||
"githubRepository": "lnreader-sources",
|
||||
"githubBranch": "master"
|
||||
}
|
||||
EOF
|
||||
tsc
|
||||
run: tsc
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Update plugins host
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
updatehost:
|
||||
if: github.repository == 'LNReader/lnreader-sources'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Update plugins host
|
||||
run: |
|
||||
git config user.name rajarsheechatterjee
|
||||
git config user.email rajarshee.adm@gmail.com
|
||||
chmod +x ./host.sh
|
||||
./host.sh
|
||||
shell: bash
|
||||
@@ -1,56 +0,0 @@
|
||||
name: Update json files
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
updatejson:
|
||||
if: github.repository == 'LNReader/lnreader-sources'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Clean up current dist
|
||||
run: |
|
||||
rm -rf .dist
|
||||
mkdir .dist
|
||||
cat > config.json << EOF
|
||||
{
|
||||
"githubUsername": "LNReader",
|
||||
"githubRepository": "lnreader-sources",
|
||||
"githubBranch": "master"
|
||||
}
|
||||
EOF
|
||||
- name: Update json files
|
||||
id: json
|
||||
run: |
|
||||
npm run json
|
||||
changes="$(git diff --staged .dist)"
|
||||
if [ "$changes" ]
|
||||
then
|
||||
changes=1
|
||||
else
|
||||
changes=""
|
||||
fi
|
||||
echo "json-diff=$changes" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create pull request
|
||||
if: ${{ steps.json.outputs.json-diff }}
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
||||
author: rajarsheechatterjee <rajarshee.adm@gmail.com>
|
||||
committer: rajarsheechatterjee <rajarshee.adm@gmail.com>
|
||||
commit-message: "plugins: update json files for new plugins"
|
||||
title: Update json files
|
||||
labels: enhancement
|
||||
body: Auto-generated PR for updating json files
|
||||
branch: update-json
|
||||
delete-branch: true
|
||||
Reference in New Issue
Block a user