Skip to content

Commit 67a3568

Browse files
Stanleyathul
Stanley
andauthored
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>
1 parent 580f6d4 commit 67a3568

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

README.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,42 @@ WakaTime gives you an idea of the time you really spent on coding. This helps yo
4848

4949
> You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.
5050
51-
Here is a sample workflow file for you to get started:
51+
Please follow the steps below:
52+
53+
1. Go to your `<username>/<username>/actions`, hit `New workflow`, `set up a workflow yourself`, delete all the default content github made for you.
54+
2. Copy the following code and paste it to your new workflow you created at step 1:
55+
```yml
56+
name: Waka Readme
57+
58+
on:
59+
workflow_dispatch
60+
schedule:
61+
# Runs at 12am UTC
62+
- cron: '0 0 * * *'
63+
64+
jobs:
65+
update-readme:
66+
name: Update this repo's README
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: athul/waka-readme@master
70+
with:
71+
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
72+
```
73+
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.
74+
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.
75+
5. Add a comment to your `README.md` like this:
76+
77+
```md
78+
<!--START_SECTION:waka-->
79+
<!--END_SECTION:waka-->
80+
```
81+
6. Go to Workflows menu (mentioned in step 1), click `Waka Readme`, click `Run workflow`.
82+
7. Go to your profile page. you will be able to see it.
5283

53-
```yml
54-
name: Waka Readme
84+
### Other Repository (not Profile)
5585

56-
on:
57-
schedule:
58-
# Runs at 12am UTC
59-
- cron: '0 0 * * *'
6086

61-
jobs:
62-
update-readme:
63-
name: Update this repo's README
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: athul/waka-readme@master
67-
with:
68-
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
69-
```
70-
71-
### Other Repository (not Profile)
7287

7388
*If you're executing the workflow on another repo other than `<username>/<username>`*
7489

0 commit comments

Comments
 (0)