grab #43
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: grab | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: Download & merge xmltv files | |
env: | |
EPG_URLS: ${{ secrets.EPG_URLS }} | |
run: | | |
chmod +x ./build.sh | |
echo -e "--------------- downloading xmltv files\n" | |
epg_urls=(${EPG_URLS//;/ }) | |
./build.sh --download "${epg_urls[@]}" | |
echo -e "--------------- merging xmltv files\n" | |
./build.sh --merge | |
- name: Update md files | |
run: | | |
echo -e "--------------- epg stats\n" | |
ls -lah | |
pip install pandas jinja2 | |
python ./scripts/check.py . | |
./build.sh --stats | |
echo -e "--------------- generating md files\n" | |
chmod +x ./scripts/readme.sh && ./scripts/readme.sh | |
chmod +x ./scripts/missed_channels.sh && ./scripts/missed_channels.sh | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.API_TOKEN }} | |
author_email: "[email protected]" | |
author_name: "Heni Fazzani" | |
commit_message: "autopublish ${date}: Merge xmltv files" | |
branch: "master" |