Skip to content

Python application #119

Python application

Python application #119

Workflow file for this run

name: Python application
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python script
run: python src/main.py --config src/config/config.json
- name: Check for changes
id: check_changes
run: |
git diff --quiet || echo "::set-output name=changes::true"
- name: Commit and push changes
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Automated changes"
git push