Update bundled openapi definition #13793
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: Update bundled openapi definition | |
"on": | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
schedule: | |
- cron: '0 * * * *' # At :00 every hour | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Fetch latest OpenAPI definition | |
shell: bash | |
run: |- | |
curl https://openapi-v2.exoscale.com/source.json | ./.sort-enums.py | jq > exoscale/openapi.json | |
- name: Commit and push if changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "[email protected]" | |
git add exoscale/openapi.json | |
timestamp=$(date -u) | |
git commit -m "OpenAPI spec update: ${timestamp}" || exit 0 | |
git push |