docs: updated workflows examples and options descriptions (#772) [skip ci]

This commit is contained in:
Simon Lecoq
2022-01-14 04:49:14 +01:00
committed by GitHub
parent 44e3992ca9
commit 4d06539136
80 changed files with 2292 additions and 450 deletions

View File

@@ -20,19 +20,39 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</details>
#### ➡️ Available options
<!--options-->
| Option | Type *(format)* **[default]** *{allowed values}* | Description |
| ------ | -------------------------------- | ----------- |
| `plugin_wakatime` | `boolean` **[no]** | Display WakaTime stats |
| `plugin_wakatime_token` 🔐 | `token` **[]** | WakaTime API token |
| `plugin_wakatime_days` | `string` **[7]** *{"7", "30", "180", "365"}* | WakaTime time range |
| `plugin_wakatime_sections` | `array` **[time, projects, projects-graphs, languages, languages-graphs, editors, os]** *{"time", "projects", "projects-graphs", "languages", "languages-graphs", "editors", "editors-graphs", "os", "os-graphs"}* | Sections to display |
| `plugin_wakatime_limit` | `number` **[5]** *{0 ≤ 𝑥}* | Maximum number of entries to display per graph |
| `plugin_wakatime_url` | `string` **[https://wakatime.com]** | Address where to reach your Wakatime instance |
| `plugin_wakatime_user` | `string` **[current]** | Your Wakatime user on the selfhosted Wakapi instance |
Legend for option icons:
* 🔐 Value should be stored in repository secrets
* ✨ New feature currently in testing on `master`/`main`
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
[➡️ Available options for this plugin](metadata.yml)
<!--examples-->
```yaml
- uses: lowlighter/metrics@latest
with:
# ... other options
plugin_wakatime: yes
plugin_wakatime_token: ${{ secrets.WAKATIME_TOKEN }} # Required
plugin_wakatime_days: 7 # Display last week stats
plugin_wakatime_sections: time, projects, projects-graphs # Display time and projects sections, along with projects graphs
plugin_wakatime_limit: 4 # Show 4 entries per graph
plugin_wakatime_url: https://wakatime.com # Wakatime url endpoint
plugin_wakatime_user: .user.login # User
name: ⏰ WakaTime
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.wakatime.svg
token: NOT_NEEDED
plugin_wakatime: 'yes'
plugin_wakatime_sections: time, projects, projects-graphs, languages, languages-graphs, editors, os
plugin_wakatime_token: ${{ secrets.WAKATIME_TOKEN }}
```
<!--/examples-->