Update README with latest YouTube videos #12437
This file contains hidden or 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: Update README with latest YouTube videos | |
| on: | |
| schedule: | |
| - cron: '0 * * * *' # Runs every 15 minutes | |
| push: | |
| branches: | |
| - main # Trigger on push to main branch | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Update README | |
| uses: GalvinPython/youtube-readme@1.1 | |
| with: | |
| youtube_channel_id: 'UCGJXFC0YsDzVP3ar8RzhCmA' | |
| readme_file_path: 'README.md' | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Commit changes | |
| run: | | |
| git add README.md | |
| git commit -m "Update README with latest YouTube videos" || echo "No changes to commit" | |
| - name: Push changes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: git push |