-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.04 KB
/
main.yml
File metadata and controls
42 lines (34 loc) · 1.04 KB
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
name: Update README with latest YouTube videos
on:
schedule:
- cron: '0 */3 * * *' # Runs every 3 hours, not that important lol
push:
branches:
- main # Trigger on push to main branch
jobs:
update-readme:
runs-on: ubuntu-slim
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