Daily update #789
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: Daily update | |
on: | |
schedule: | |
- cron: "15 8 * * 1-5" #Run at 8:15 UTC every day except weekend | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9.7' # install the python version needed | |
- name: Install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Get today price | |
env: | |
# TOKEN: ${{secrets.TOKEN}} | |
COOKIES: ${{secrets.COOKIES}} | |
run: python get_price.py | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Auto update data" -a | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{secrets.ACCESS_TOKEN_GITHUB}} | |
branch: main | |
- name: Send message to Telegram channel | |
env: | |
TOKEN: ${{secrets.TOKEN}} | |
run: python channel.py |