Merge branch 'main' of https://github.com/SAMMISolutions/SAMMI-Bridge #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Merge JSON files | |
on: | |
push: | |
paths: | |
- 'extensions/**' | |
pull_request: | |
types: [closed] | |
paths: | |
- 'extensions/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Merge JSON files | |
run: node .github/workflows/merge-json-files.js | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add extensions/extensions.json | |
git commit -m "Merge JSON files" -a | |
git push |