-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a28ba1
commit 284aacd
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Generate OpenAPI Schemas from Atproto Lexicons | ||
on: push | ||
|
||
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: ./atproto-openapi-types/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: atproto-openapi-types/lexicons/ atproto-openapi-types/spec/api.json |