-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (47 loc) · 1.64 KB
/
watch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
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-branch: 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
team-reviewers: |
owners
maintainers
draft: false