8000 release: 1.0 · GalvinPython/youtube-readme@10c9af2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10c9af2

Browse files
committed
release: 1.0
1 parent acf75e2 commit 10c9af2

File tree

4 files changed

+66
-8
lines changed

4 files changed

+66
-8
lines changed

LICENSE

Whitespace-only changes.

README.md

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
1-
> [!CAUTION]
2-
> This action is being tested. Do not attempt to use whilst this warning is active!
3-
41
# YouTube Readme Updater
5-
Updates your README file to show your latest video uploads
2+
Updates your README file to show your latest video uploads on YouTube!
3+
4+
# Example Usage
5+
> [!IMPORTANT]
6+
> This action uses NodeJS 20
7+
8+
To use, simply create a file called `.github/workflows/main.yml` in your target repository. `main.yml` can be anything as long as it's a `.yml` file
9+
10+
```yml
11+
name: Update README with latest YouTube videos
12+
13+
on:
14+
schedule:
15+
- cron: '0 * * * *' # Runs every hour
16+
17+
jobs:
18+
update-readme:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v3 10000
27+
with:
28+
node-version: '20'
29+
30+
- name: Update README
31+
uses: GalvinPython/youtube-readme@1.0
32+
with:
33+
youtube_channel_id: '' # Replace with your channel ID
34+
readme_file_path: 'README.md'
35+
36+
- name: Configure Git
37+
run: |
38+
git config --global user.name 'github-actions[bot]'
39+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
40+
41+
- name: Commit changes
42+
run: |
43+
git add README.md
44+
git commit -m "Update README with latest YouTube videos" || echo "No changes to commit"
45+
46+
- name: Push changes
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: git push
50+
```
51+
52+
# API
53+
You can find the server for the API [here](https://github.com/GalvinPython/latest-uploads-api)
54+
55+
# Future Improvements
56+
* Set a value between 1 and 5 videos
57+
* Choose either shorts, streams or videos (or all)
58+
* Format better
59+
* Video statistics
60+
61+
# Changelog
62+
## V1.0
63+
* Released action

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "update-youtube-readme",
3-
"version": "0.1-rc1",
3+
"version": "1.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
99
"keywords": [],
1010
"author": "",
11-
"license": "ISC",
11+
"license": "MIT",
1212
"dependencies": {
1313
"@actions/core": "^1.10.1"
1414
}

0 commit comments

Comments
 (0)
0