run service.py #36
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: run service.py | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "* */24 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v4 # checkout the repository content to github runner | |
- name: execute py script # run service.py | |
run: python -c "import os; os.chdir('.epg'); import c" | |
- name: commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "psylo-dev" | |
git add -A | |
git diff-index --quiet HEAD || (git commit -a -m "updated epg" --allow-empty) | |
- name: push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
retain_days: 0 | |
keep_minimum_runs: 0 |