Update data #569
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 data | |
on: | |
schedule: | |
- cron: 35 11 * * * # 6:35 PM in Vietnam | |
jobs: | |
update-data: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v4 | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: pip | |
cache-dependency-path: requirements.txt | |
- name: install python packages | |
run: | | |
pip install -r requirements.txt | |
- name: update data | |
run: python main.py | |
- name: get current date | |
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: push changes | |
uses: actions-x/commit@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
message: Updated ${{ env.date }} | |
email: [email protected] | |
name: GitHub Action |