Skip to content

trigger-airing-1

trigger-airing-1 #4543

name: Update Feed 1
on:
repository_dispatch:
types: [trigger-airing-1]
jobs:
update-feed-1:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install requests pytz
- name: Delay for 5 minutes
run: sleep 300 # 300 seconds is 5 minutes
- name: Pull latest changes
run: |
git pull origin main --rebase
- name: Run update script for Feed 1
run: python toshofeed.py 1 1 1
- name: Commit and push changes
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add rssfeed/*.xml
git commit -m "Scheduled update for Feed 1" || echo "No changes to commit"
git pull origin main --rebase
git push https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git