Skip to content

Commit

Permalink
release: 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GalvinPython committed Jun 30, 2024
1 parent acf75e2 commit 10c9af2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 8 deletions.
Empty file added LICENSE
Empty file.
66 changes: 62 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
> [!CAUTION]
> This action is being tested. Do not attempt to use whilst this warning is active!
# YouTube Readme Updater
Updates your README file to show your latest video uploads
Updates your README file to show your latest video uploads on YouTube!

# Example Usage
> [!IMPORTANT]
> This action uses NodeJS 20
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

```yml
name: Update README with latest YouTube videos

on:
schedule:
- cron: '0 * * * *' # Runs every hour

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.0
with:
youtube_channel_id: '' # Replace with your channel ID
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
```
# API
You can find the server for the API [here](https://github.com/GalvinPython/latest-uploads-api)
# Future Improvements
* Set a value between 1 and 5 videos
* Choose either shorts, streams or videos (or all)
* Format better
* Video statistics
# Changelog
## V1.0
* Released action
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "update-youtube-readme",
"version": "0.1-rc1",
"version": "1.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1"
}
Expand Down

0 comments on commit 10c9af2

Please sign in to comment.