Merge pull request #1795 from nextcloud/dependabot/composer/tests/Int… #269
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: 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 |