Fetch new lexicons and regenerate code and docs #192
This file contains hidden or 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: Fetch new lexicons and regenerate code and docs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 12 * * 5' # at 12:00 on Friday day | |
| permissions: | |
| contents: read | |
| jobs: | |
| update_lexicons: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository. | |
| uses: actions/checkout@v4 | |
| - name: Set up Python. | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Setup Poetry. | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.2.1 | |
| - name: Install dependencies. | |
| run: poetry install --no-interaction | |
| - name: Update lexicons and regen. | |
| run: | | |
| source $(poetry env info -p)/bin/activate | |
| echo "COMMIT_MESSAGE=$(poetry run python update_lexicons.py)" >> $GITHUB_ENV | |
| - name: Create Pull Request. | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| committer: Ilya (Marshal) <ilya@marshal.dev> | |
| author: Ilya (Marshal) <ilya@marshal.dev> | |
| commit-message: ${{ env.COMMIT_MESSAGE }} | |
| body: This PR was automatically generated | |
| base: main | |
| branch: update-lexicons | |
| title: ${{ env.COMMIT_MESSAGE }} | |
| assignees: MarshalX |