Readme Updates and Usages in Profile Repo
This commit is contained in:
parent
6a5ebb1ab0
commit
c469bfb723
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@ -1,27 +0,0 @@
|
|||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: Waka Readme
|
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
||||||
# events but only for the master branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
schedule:
|
|
||||||
# Runs at 12am UTC
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Update Readme
|
|
||||||
uses: athul/waka-readme@master
|
|
||||||
with:
|
|
||||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
|
||||||
|
|
@ -5,4 +5,4 @@ ADD requirements.txt /requirements.txt
|
|||||||
ADD main.py /main.py
|
ADD main.py /main.py
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
CMD python main.py
|
CMD ["python", "/main.py"]
|
46
README.md
46
README.md
@ -15,34 +15,58 @@ The lines will be our entrypoints for our metrics.
|
|||||||
|
|
||||||
## Using it
|
## Using it
|
||||||
|
|
||||||
- Get a GitHub Access Token with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
|
||||||
- Get your Wakatime API Key and save it as `WAKATIME_API_KEY = <your wakatime API Key>` in your Repository Secrets
|
- Get your Wakatime API Key and save it as `WAKATIME_API_KEY = <your wakatime API Key>` in your Repository Secrets
|
||||||
|
|
||||||
That's it. The Action runs everyday at 00.00 UTC
|
That's it. The Action runs everyday at 00.00 UTC
|
||||||
|
|
||||||
----
|
### Profile Repository
|
||||||
Here is Sample Worflow File
|
|
||||||
|
If you're executing the workflow on your Profile Repository (`<username>/<username>`)
|
||||||
|
|
||||||
|
**You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.**
|
||||||
|
|
||||||
|
Here is a sample workflow file for you to get started,
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Waka Readme
|
name: Waka Readme
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
schedule:
|
schedule:
|
||||||
# Runs at 12am UTC
|
# Runs at 12am UTC
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
update-readme:
|
||||||
|
name: Update this repo's README
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: athul/waka-readme@master
|
||||||
uses: actions/checkout@v2
|
with:
|
||||||
|
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||||
|
```
|
||||||
|
|
||||||
- name: Update Readme
|
### Different Repository than Profile Repository
|
||||||
uses: athul/waka-readme@master
|
|
||||||
|
if you're executing the workflow on another repo other than `<username>/<username>`
|
||||||
|
|
||||||
|
- Get a GitHub Access Token with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
||||||
|
|
||||||
|
Here is Sample Worflow File for running it
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Waka Readme
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Runs at 12am UTC
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-readme:
|
||||||
|
name: Update Readme with Metrics
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: athul/waka-readme@master
|
||||||
with:
|
with:
|
||||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user