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
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
CMD python main.py
|
||||
CMD ["python", "/main.py"]
|
48
README.md
48
README.md
@ -15,34 +15,58 @@ The lines will be our entrypoints for our metrics.
|
||||
|
||||
## 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
|
||||
|
||||
That's it. The Action runs everyday at 00.00 UTC
|
||||
|
||||
----
|
||||
Here is Sample Worflow File
|
||||
### Profile Repository
|
||||
|
||||
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
|
||||
name: Waka Readme
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
# Runs at 12am UTC
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
update-readme:
|
||||
name: Update this repo's README
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Update Readme
|
||||
uses: athul/waka-readme@master
|
||||
- uses: athul/waka-readme@master
|
||||
with:
|
||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||
```
|
||||
|
||||
### Different Repository than Profile Repository
|
||||
|
||||
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:
|
||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user