Convert Lexicons to OpenAPI #7199
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: Convert Lexicons to OpenAPI | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 */2 * * *" # every 2 hours | |
jobs: | |
convert: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Check formatting | |
run: deno fmt --check | |
- name: Run linter | |
run: deno lint | |
- name: Cache dependencies | |
run: deno cache main.ts | |
- name: Get latest copy of bluesky-social/atproto lexicons | |
run: ./scripts/get-lexicons.sh | |
- name: Convert lexicons to OpenAPI spec | |
run: deno task run | |
- name: Commit OpenAPI spec updates | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: spec/api.json updated | |
file_pattern: lexicons/ spec/api.json |