discover-podcast-feeds #718
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: 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' |