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

@@ -26,17 +26,49 @@ Create an app from your [developer dashboard](https://developer.twitter.com/en/p
</details>
#### ➡️ Available options
<!--options-->
| Option | Type *(format)* **[default]** *{allowed values}* | Description |
| ------ | -------------------------------- | ----------- |
| `plugin_tweets` | `boolean` **[no]** | Display recent tweets |
| `plugin_tweets_token` 🔐 | `token` **[]** | Twitter API token |
| `plugin_tweets_attachments` | `boolean` **[no]** | Display tweets attchments |
| `plugin_tweets_limit` | `number` **[2]** *{1 ≤ 𝑥 ≤ 10}* | Maximum number of tweets to display |
| `plugin_tweets_user` | `string` **[.user.twitter]** | Twitter username |
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_tweets: yes
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} # Required
plugin_tweets_attachments: yes # Display tweets attachments (images, preview urls, etc.)
plugin_tweets_limit: 2 # Limit to 2 tweets
plugin_tweets_user: .user.twitter # Defaults to your GitHub linked twitter username
name: Latest tweets
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.tweets.svg
token: NOT_NEEDED
plugin_tweets: 'yes'
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_user: github
```
```yaml
name: Latest tweets including attachments
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.tweets.attachments.svg
token: NOT_NEEDED
plugin_tweets: 'yes'
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
plugin_tweets_attachments: 'yes'
plugin_tweets_user: github
```
<!--/examples-->