-
Notifications
You must be signed in to change notification settings - Fork 8
31 lines (28 loc) · 952 Bytes
/
openapi.yaml
File metadata and controls
31 lines (28 loc) · 952 Bytes
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
---
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://api-ch-gva-2.exoscale.com/v2/openapi.json | ./.sort-enums.py | jq > exoscale/openapi.json
curl https://partner-api.exoscale.com/v1.alpha/openapi.json | ./.sort-enums.py | jq > exoscale/partner-api.json
- name: Commit and push if changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add exoscale/openapi.json exoscale/partner-api.json
timestamp=$(date -u)
git commit -m "OpenAPI spec update: ${timestamp}" || exit 0
git push