Update Lexicons #2
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: Update Lexicons | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 18 * * *" | |
jobs: | |
update-lexicons: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Delete Old Branch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git fetch origin | |
if git show-ref --quiet refs/remotes/origin/pull-latest-lexicons; then | |
git push origin --delete pull-latest-lexicons | |
fi | |
- name: Create New Branch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git switch -c pull-latest-lexicons | |
git push -u origin pull-latest-lexicons | |
- uses: dart-lang/[email protected] | |
- name: Install dependencies | |
run: dart pub get | |
- name: Pull Latest Lexicons | |
run: dart run ./bin/pull_latest_lexicons.dart | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
- name: Generate | |
run: | | |
dart run ./bin/generate_lexicon_ids.dart | |
dart run ./bin/generate_lexicon_matrix.dart | |
dart run ./bin/generate_supported_api_matrix.dart | |
dart run ./bin/generate_lexicon_docs.dart | |
- name: Format | |
run: | | |
dart format packages/lexicon | |
dart format packages/atproto | |
dart format packages/bluesky | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: "[Scheduled] Pull Latest Lexicons" | |
title: "[Scheduled] Pull Latest Lexicons" | |
branch: pull-latest-lexicons | |
base: main | |
labels: Github Actions | |
assignees: "${{ github.actor }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |