UpdateEPG #1212
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: UpdateEPG | |
on: | |
schedule: | |
- cron: '0 12 * * *' | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install | |
run: | | |
sudo apt update | |
sudo apt install python3 python3-requests python3-bs4 python3-tz xmltv-util | |
- name: run | |
env: | |
PROXY: ${{ secrets.PROXY }} | |
NOVA_TOKEN: ${{ secrets.NOVA_TOKEN }} | |
run: | | |
python main.py | |
tv_sort --by-channel --duplicate-error --output epg.xml epg-tmp.xml | |
echo '<!-- generated on '`date -u`' -->' >> epg.xml | |
gzip -k epg.xml | |
- name: Upload Gz | |
if: ${{ github.event_name != 'pull_request'}} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./epg.xml.gz | |
asset_name: epg.xml.gz | |
tag: EPG | |
body: EPG | |
overwrite: true | |
- name: Upload Xml | |
if: ${{ github.event_name != 'pull_request'}} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./epg.xml | |
asset_name: epg.xml | |
tag: EPG | |
body: EPG | |
overwrite: true |