Skip to content

Merge pull request #47 from mohitthakkar30/main #71

Merge pull request #47 from mohitthakkar30/main

Merge pull request #47 from mohitthakkar30/main #71

name: Combine JSON configuration files
on:
push:
branches:
- 'main'
jobs:
merge_json_files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Or your preferred version
- name: Merge JSON files
run: |
node merge-config.js
- name: Commit and push changes
run: |
git config --global user.name "$GIT_USERNAME"
git config --global user.email "$GIT_EMAIL"
git add config.json
git diff-index --quiet HEAD || git commit -m "Merge JSON files"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USERNAME: github-actions[bot]
GIT_EMAIL: github-actions[bot]@users.noreply.github.com