Python #507
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: Python | |
on: | |
schedule: | |
- cron: "0 */6 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
architecture: "x64" | |
cache: "pip" | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run main.py | |
env: | |
BASE_URL: ${{secrets.BASE_URL}} | |
EMAIL: ${{secrets.EMAIL}} | |
PASSWORD: ${{secrets.PASSWORD}} | |
run: | | |
python main.py | |
- name: Keep alive | |
run: | | |
echo "$(date +"%Y-%m-%d %H:%M:%S")" > updated | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m "updated" || exit 0 | |
git push |