Merge pull request #562 from VNG-Realisatie/Check-op-links-en-teksten #21
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: generate-postman-collection | |
on: | |
push: | |
paths: | |
- "specificatie/genereervariant/*.yaml" | |
- ".github/workflows/generate-postman-collection.yml" | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
generate-sdks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Generate Postman collection | |
run: npm run oas:generate-postman-collection | |
- name: push generated postman collection to remote | |
run: | | |
if [ -n "$(git status ./test/BAG-Bevragen-postman-collection.json --porcelain)" ]; then | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
git add test/BAG-Bevragen-postman-collection.json | |
git commit -m "commit generated postman artifacts" | |
git pull --ff | |
git push | |
fi |