-
-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (38 loc) · 1.12 KB
/
actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build EPG
on:
schedule:
- cron: '0 */8 * * *'
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "RUN_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: checkout repo content
uses: actions/checkout@v4
- name: pull changes
run: |
git pull
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute py script
run: python main.py
- name: commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "Updated EPG listings on $RUN_DATE" --allow-empty)
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master