Skip to content

Commit

Permalink
Add OpenAPI CI
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Aug 14, 2023
1 parent a862cca commit 9354599
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: OpenAPI

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
openapi:
runs-on: ubuntu-latest

if: ${{ github.repository_owner != 'nextcloud-gmbh' }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: xml
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer i

- name: OpenAPI checker
run: |
composer exec generate-spec
if [ -n "$(git status --porcelain openapi.json)" ]; then
git diff
exit 1
fi

0 comments on commit 9354599

Please sign in to comment.