Go GitHub Action that adds Coding time statistics to your README
PHP 2 hrs 53 mins 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨⬜⬜⬜⬜⬜⬜⬜⬜⬜ 66.79 %
Vue.js 1 hr 24 mins 🟨🟨🟨🟨🟨🟨🟨🟨⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ 32.48 %
JSON 1 min ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ 0.66 %
JavaScript 0 secs ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ 0.07 %
Total Time Coded: 973 hrs 20 mins
Timespan: 832 days
Daily average: 1 hr(s) 9 min(s)
- Update the markdown file with 2 comments:
<!--WakaTime-Start-->and<!--WakaTime-End--> - Get your WakaTime API Key (https://wakatime.com/settings/account)
- Generate a GitHub API Token with repo and user scope (https://github.com/settings/tokens)
- Store the WakaTime API Key and GitHub access token in your repository's action secrets as following:
- WakaTime API Key:
WAKATIME_API_KEY=<your key> - GitHub Token:
GH_TOKEN=<your GitHub access token>
- WakaTime API Key:
- Create a new GitHub Action in the Repository, you want the Readme stats in:
name: WakaTime Readme
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
env:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
THEME: "default"
jobs:
WakaTime-README:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: NickRTR/WakaTime-Readme@main- Wait for the action to run automatically every night or run it manually for testing purposes.
- Let the magic happen 🚀
There are a number of different themes, you can choose from.
| Theme | env variable |
|---|---|
| ░█ | default |
| ------ | -------------- |
| ⬜🟩 | block-green |
| ⬜🟨 | block-yellow |
| ⬜🟥 | block-red |
| ⬜🟪 | block-purple |
| ⬜🟧 | block-orange |
| ⬜🟦 | block-blue |
| ⬜⬛ | block-black |
| ------ | -------------- |
| ⚪🟢 | circle-green |
| ⚪🟡 | circle-yellow |
| ⚪🔴 | circle-red |
| ⚪🟣 | circle-purple |
| ⚪🟠 | circle-orange |
| ⚪🔵 | circle-blue |
| ⚪⚫ | circle-black |
Specify a theme by adding THEME: <theme> to the env variables of your workflow yaml file.
If no theme is specified, the default is selected.