added more detailed readme (#21)
* added more detailed readme * Update README.md Co-authored-by: Athul Cyriac Ajay <athul8720@gmail.com> Co-authored-by: Athul Cyriac Ajay <athul8720@gmail.com>
This commit is contained in:
parent
580f6d4639
commit
67a3568c75
27
README.md
27
README.md
@ -48,17 +48,20 @@ WakaTime gives you an idea of the time you really spent on coding. This helps yo
|
|||||||
|
|
||||||
> You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.
|
> 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:
|
Please follow the steps below:
|
||||||
|
|
||||||
```yml
|
1. Go to your `<username>/<username>/actions`, hit `New workflow`, `set up a workflow yourself`, delete all the default content github made for you.
|
||||||
name: Waka Readme
|
2. Copy the following code and paste it to your new workflow you created at step 1:
|
||||||
|
```yml
|
||||||
|
name: Waka Readme
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch
|
||||||
schedule:
|
schedule:
|
||||||
# Runs at 12am UTC
|
# Runs at 12am UTC
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-readme:
|
update-readme:
|
||||||
name: Update this repo's README
|
name: Update this repo's README
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -66,10 +69,22 @@ jobs:
|
|||||||
- uses: athul/waka-readme@master
|
- uses: athul/waka-readme@master
|
||||||
with:
|
with:
|
||||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||||
```
|
```
|
||||||
|
3. Go to your repo secrets by hitting `Settings => Secrets` tab in your profile repo. You can also enter the url https://github.com/USERNAME/USERNAME/settings/secrets . Please replace the `USERNAME` with your own username.
|
||||||
|
4. Create a new `Secret`. `Name`: `WAKATIME_API_KEY`, `Value`: Paste the Wakatime API key here. If you don't know what is the key, please go to [Account Settings in WakaTime](https://wakatime.com/settings/account) to find your API Key there.
|
||||||
|
5. Add a comment to your `README.md` like this:
|
||||||
|
|
||||||
|
```md
|
||||||
|
<!--START_SECTION:waka-->
|
||||||
|
<!--END_SECTION:waka-->
|
||||||
|
```
|
||||||
|
6. Go to Workflows menu (mentioned in step 1), click `Waka Readme`, click `Run workflow`.
|
||||||
|
7. Go to your profile page. you will be able to see it.
|
||||||
|
|
||||||
### Other Repository (not Profile)
|
### Other Repository (not Profile)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*If you're executing the workflow on another repo other than `<username>/<username>`*
|
*If you're executing the workflow on another repo other than `<username>/<username>`*
|
||||||
|
|
||||||
You'll need to get a [GitHub Access Token](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
You'll need to get a [GitHub Access Token](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user