check_new_disclosures_twse #480
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: check_new_disclosures_twse | |
| on: | |
| schedule: | |
| - cron: '00 07 * * *' | |
| workflow_dispatch: | |
| # to consider: the use of action jobs to breakout each task | |
| # https://docs.github.com/en/actions/learn-github-actions/essential-features-of-github-actions#sharing-data-between-jobs | |
| jobs: | |
| run-check-twse: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 170 | |
| environment: CI | |
| steps: | |
| - name: Install Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| - name: Checkout the repo | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| pip3 install -r twse_requirements.txt | |
| - name: Initialize Playwright | |
| run: | | |
| playwright install | |
| - name: Post TWSE Announcements | |
| env: | |
| TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }} | |
| TG_TK: ${{ secrets.TG_TK }} | |
| run: | | |
| python3 twse.py | |