-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpush_openapi_spec_to_readme.yml
More file actions
47 lines (43 loc) · 1.45 KB
/
push_openapi_spec_to_readme.yml
File metadata and controls
47 lines (43 loc) · 1.45 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
name: Build and sync docs on pushes to master branch
on:
push:
branches:
- master
defaults:
run:
shell: bash
permissions:
id-token: write
jobs:
rdme-openapi-pr:
runs-on: ubuntu-latest
steps:
- name: Authenticate to AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::403483446840:role/autogen_github_actions_beta_push_openapi_spec_to_readme
- name: Load secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: README_API,readme_api_key
# readme_api_key secret is stored as {key:"***..."}.
# GitHub Actions environment variable name is README_API so to access "key" from the json we can use README_API_KEY
parse-json-secrets: true
- name: Check out repo 📚
uses: actions/checkout@v5
- name: Set up Python 🐍
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies 📦
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Convert YAML to JSON 🔄
run: python convert_yaml_to_json.py
- name: Run `openapi` command 🚀
uses: readmeio/rdme@v10
with:
# id is the id of the API definition
rdme: openapi upload defs/asana_oas.json --key=${{ env.README_API_KEY }} --slug=asana