Skip to content

Merge pull request #1452 from pnp/dependabot/npm_and_yarn/samples/rea… #128

Merge pull request #1452 from pnp/dependabot/npm_and_yarn/samples/rea…

Merge pull request #1452 from pnp/dependabot/npm_and_yarn/samples/rea… #128

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