-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.79 KB
/
sync-openapi.yml
File metadata and controls
69 lines (56 loc) · 1.79 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: sync-openapi
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Validate sync secret
env:
JUSTSERPAPI_OPENAPI_API_KEY: ${{ secrets.JUSTSERPAPI_OPENAPI_API_KEY }}
run: |
if [ -z "${JUSTSERPAPI_OPENAPI_API_KEY}" ]; then
echo "Missing JUSTSERPAPI_OPENAPI_API_KEY secret" >&2
exit 1
fi
- name: Refresh OpenAPI and generated runtime
env:
JUSTSERPAPI_OPENAPI_API_KEY: ${{ secrets.JUSTSERPAPI_OPENAPI_API_KEY }}
run: python3 scripts/sdkctl.py sync
- name: Run control-plane unit tests
run: python3 -m unittest discover -s scripts/tests -v
- name: Run Ruby tests
run: bundle exec rake test
- name: Build gem
run: gem build justserpapi.gemspec
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
branch: automation/openapi-sync
commit-message: "chore: sync OpenAPI-generated Ruby SDK"
title: "chore: sync OpenAPI-generated Ruby SDK"
body: |
Automated OpenAPI sync.
- refreshed the raw upstream OpenAPI document
- regenerated the normalized codegen spec
- updated the committed generated Ruby runtime
labels: |
automation
openapi