forked from VNG-Realisatie/Regels-bij-activiteiten
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.02 KB
/
lint-oas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: lint-oas
on:
push:
paths:
- specificatie/*.yaml
- .github/workflows/lint-oas.yml
branches:
- '**'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install dependencies
run: npm install
- name: lint OAS
run: npm run oas:lint
- name: resolve OAS
run: npm run oas:resolve
- name: lint resolved OAS
run: npm run oas:lint-genereervariant
- name: push resolved to remote
run: |
if [ -n "$(git status specificatie/genereervariant/openapi.yaml --porcelain)" ]; then
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add specificatie/genereervariant/openapi.*
git commit -m "commit resolve artifacts"
git pull --ff
git push
fi