update-types #5439
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-types | |
on: | |
schedule: | |
- cron: '0 5-15 * * 1-5' | |
workflow_dispatch: | |
jobs: | |
update-types: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install requirements | |
run: yarn install | |
- name: build | |
run: yarn build | |
- name: update types | |
run: | | |
yarn export-types:all | |
- name: diff check | |
id: diff-check | |
run: | | |
echo "types-diff=$(git diff HEAD | wc -l)" >> $GITHUB_ENV | |
- name: bump version # if types changed | |
if: ${{ env.types-diff > 0 }} | |
run: yarn bump-version | |
- name: send message to telegram # if types changed | |
if: ${{ env.types-diff > 0 }} | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
Types are waiting for updates. I can't create a PR, but I can warn. |