Merge pull request #641 from opengeospatial/Fix-OpenAPI-errors #96
This file contains hidden or 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: Build OpenAPI bundle | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'core/standard/openapi/**.yaml' | |
| jobs: | |
| build-openapi-bundle: | |
| name: Generate OpenAPI bundle | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup npm | |
| uses: actions/setup-node@v4 | |
| - name: Install dependencies | |
| run: npm install @redocly/cli -g | |
| - name: Checkout | |
| uses: actions/checkout@master | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate OpenAPI 3.0 bundle | |
| run: | | |
| cd core/standard/openapi | |
| redocly bundle -o /tmp/ogcapi-environmental-data-retrieval-1-oas30.bundled.json ogcapi-environmental-data-retrieval-1-oas30.yaml | |
| - name: Generate OpenAPI 3.1 bundle | |
| run: | | |
| cd core/standard/openapi | |
| redocly bundle -o /tmp/ogcapi-environmental-data-retrieval-1-oas31.bundled.json ogcapi-environmental-data-retrieval-1-oas31.yaml | |
| - name: Commit changes and push | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Tom Kralidis" | |
| mv -f /tmp/ogcapi-environmental-data-retrieval-1-oas30.bundled.json . | |
| mv -f /tmp/ogcapi-environmental-data-retrieval-1-oas31.bundled.json . | |
| if [[ `git status --porcelain` ]]; then | |
| git add . | |
| git commit -am "Updating OpenAPI build" | |
| git push | |
| else | |
| echo "No changes to push" | |
| fi |