Skip to content

Commit

Permalink
Automatically update lexicons
Browse files Browse the repository at this point in the history
  • Loading branch information
christiandeange committed Nov 9, 2024
1 parent b2b61c6 commit 6f2cec7
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/update_lexicons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update Lexicons

on:
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:

jobs:
update-lexicons:
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
check-latest: true

- name: Clone atproto repository
uses: actions/checkout@v3
with:
repository: bluesky-social/atproto
path: tmp-atproto

- name: Overwrite lexicons
run: |
rm -rf lexicons/schemas
cp -R tmp-atproto/lexicons lexicons/schemas
- name: Get Changed Files
uses: tj-actions/verify-changed-files@v20
id: changed-files

- name: List Changed Files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.changed_files }}
run: |
echo "Changed files: $CHANGED_FILES"
- name: Smoke Test
if: steps.changed-files.outputs.files_changed == 'true'
run: ./gradlew clean apiDump :app:desktop:assemble --no-daemon --stacktrace

# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v4
# if: steps.changed-files.outputs.files_changed == 'true'
# with:
# commit_message: Update lexicons from atproto
# file_pattern: '*.api lexicons/schemas/**'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ Package.swift
### Project ###
/docs
/.kotlin/

### CI ###
tmp-atproto/

0 comments on commit 6f2cec7

Please sign in to comment.