Skip to content

React application news ticker #109

React application news ticker

React application news ticker #109

name: Merge Samples
on:
push:
branches:
- main
pull_request:
branches:
- main
types: [closed]
jobs:
merge_samples:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Merge samples
run: node .github/scripts/merge-samples/index.js
- name: Commit and push if necessary
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add -A
git diff --staged --quiet || git commit -m "Automated samples.json update"
git push