Github Action That Provides Latest Public GitHub Repos From A User
Argument | Default | Description |
---|---|---|
GITHUB_USERNAME |
NULL | Provide A Valid Github Username To Fetch Latest Repo |
MAX_REPOS |
6 | Number Of Latest Repo To Fetch And Provide As JSON |
GH_TOKEN |
NULL | Github Personal Access Token |
SAVE_LOCATION |
/ | Path To Save The JSON File |
FILE_NAME |
repos.json | Custom Option To Set A Custom FILE NAME |
Github Personal Token Is required with the below scope
- Step1 : Create A File Named gh-latest-repo.yml in
/.github/workflows/
- Step2 : Copy & Paste The Below Content In That File
name: ON_PUSH
on:
schedule:
- cron: '*/60 * * * *'
jobs:
GH_Latest_Repo:
runs-on: ubuntu-latest
steps:
- name: 📩 Fetching Repository
uses: actions/checkout@v2
- name: 📝 Generating JSON
uses: varunsridharan/action-gh-latest-repo@master
with:
GH_TOKEN: ${{secrets.GH_TOKEN}}
GITHUB_USERNAME: "varunsridharan"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Step1 : Create the branch you need.
- Step2 : Create A File Named gh-latest-repo.yml in
/.github/workflows/
in MASTER BRANCH - Step3 : Copy & Paste The Below Content In That File
name: ON_PUSH
on:
schedule:
- cron: '*/60 * * * *'
jobs:
GH_Latest_Repo:
runs-on: ubuntu-latest
steps:
- name: 📩 Fetching Repository
uses: actions/checkout@v2
with:
ref: 'your-branch-here'
- name: 📝 Generating JSON
uses: varunsridharan/action-gh-latest-repo@master
with:
GH_TOKEN: ${{secrets.GH_TOKEN}}
GITHUB_USERNAME: "varunsridharan"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
🤔 Inspired By Sindre Sorhus
First when i saw his website i was so confused on how he was able to fetch the latest github repo via the domain https://gh-latest-repos.now.sh/
& Also i never heared of the domain .now.sh
So i was trying to figure on where i can purchase and after going through lots of Website's i somehow, ended here sindresorhus/gh-latest-repos
That's when i found out .now.sh
is domain provided by https://vercel.com and its FREE!!!
So you guessed it. I jumped right into it and tried to get it up & Running. But I failed and was not able to get it since i am not that familiar with it.
Since i am familiar Github Actions i decided to convert his script into a Action Package
Thanks To Sindre Sorhus For Creating Such Wonderful Microservice
If you would like to help, please take a look at the list of issues or the To Do checklist.
This project is licensed under General Public License v3.0 license. See the LICENSE file for more info.
If you find it useful, let me know 😉
Built With
🌟 This repository if this project helped you!