python-app.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This workflow will install Python dependencies, run tests and lint with a single version of Python
  2. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
  3. name: Python application
  4. on:
  5. schedule:
  6. - cron: '30 5,17 * * *'
  7. push:
  8. branches: [ "main" ]
  9. pull_request:
  10. branches: [ "main" ]
  11. permissions:
  12. contents: write
  13. jobs:
  14. build:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. - name: Set up Python 3.10
  19. uses: actions/setup-python@v3
  20. with:
  21. python-version: "3.10"
  22. - name: Install Poetry
  23. uses: snok/install-poetry@v1
  24. - name: Install dependencies
  25. run: |
  26. poetry install --no-interaction --no-root
  27. - name: Get Latest Fixtures
  28. run: |
  29. poetry run python main.py
  30. - name: Commit Changes
  31. run: |
  32. if ! git diff-index --quiet HEAD; then
  33. git config --global user.name 'Karl Hudgell'
  34. git config --global user.email 'karl@k-world.me.uk'
  35. git commit -am "Updated ical"
  36. git push
  37. fi