-
Notifications
You must be signed in to change notification settings - Fork 9
70 lines (59 loc) · 2.22 KB
/
discover_feeds.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: discover-podcast-feeds
on:
workflow_dispatch:
schedule:
# Workaround to compensate for daylight savings
- cron: '0 6 * 4-10 *' # April through October
- cron: '0 7 * 11,12,1,2,3 *' # November through March
# Nightly run to pick up missed updates and avoid delays caused by caching
- cron: '0 1 * * *'
jobs:
update-feeds:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11.5'
cache: 'pip'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Execute discovery script
run: python discover_feeds.py
# - name: Create Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@v4
# with:
# title: "chore(auto): Update podcast configuration"
# body: "Automated discovery routine found new podcasts or changes to existing podcast feeds."
# branch: update-podcast-configuration
# commit-message: "chore(auto): Update podcast configuration"
# committer: nrk-pod-feeds auto-discovery <[email protected]>
# labels: enhancement
# delete-branch: true
# add-paths: |
# podcasts.json
# - name: Checkout PR branch
# if: ${{ steps.cpr.outputs.pull-request-operation == 'created' }}
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: update-podcast-configuration
# - name: Run tests on PR branch
# if: ${{ steps.cpr.outputs.pull-request-operation == 'created' }}
# run: pytest -vv
- name: Execute feed generation script (smoke test)
run: python generate_feeds.py
- name: Auto-commit changes and push
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(auto): Update podcast configuration"
commit_author: nrk-pod-feeds auto-discovery <[email protected]>
repository: .
file_pattern: 'podcasts.json DISCOVERY.md'