watch pyright #1452
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: watch pyright | |
on: | |
schedule: | |
# At 7 am UTC every day | |
- cron: "0 7 * * *" | |
workflow_dispatch: | |
jobs: | |
update_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- run: pip install -r dev-requirements.txt | |
- name: Check pyright version | |
run: | | |
PYRIGHT_VERSION=$(npm view pyright version) | |
echo "PYRIGHT_VERSION=$PYRIGHT_VERSION" >> $GITHUB_ENV | |
echo "BRANCH_NAME=${PYRIGHT_VERSION//./-}" >> $GITHUB_ENV | |
echo "PYRIGHT_OUT_OF_DATE=$(python version.py --compare $PYRIGHT_VERSION)" >> $GITHUB_ENV | |
- name: Set pyright version | |
if: ${{ env.PYRIGHT_OUT_OF_DATE == '1' }} | |
run: | | |
python version.py --set ${{ env.PYRIGHT_VERSION }} | |
- name: Create Pull Request | |
if: ${{ env.PYRIGHT_OUT_OF_DATE == '1' }} | |
uses: peter-evans/create-pull-request@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
with: | |
token: ${{ secrets.REPO_TOKEN }} | |
commit-message: Pyright NPM Package update to ${{ env.PYRIGHT_VERSION }} | |
signoff: false | |
branch: pyright-update-${{ env.BRANCH_NAME }} | |
delete-bran 2011 ch: true | |
title: '[pyright updated to ${{ env.PYRIGHT_VERSION }}] Update Version' | |
body: | | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: | | |
automated pr | |
draft: false |