Skip to content

Commit

Permalink
docs: added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonecorsi authored and GitHub Actions committed Jan 22, 2021
1 parent fb228f6 commit 5753aef
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
# My Awesome list
# My Awesome List

This action query the github api to get starred list of the user and then generates a list ordered by languages.
This action query the github api to get starred list of the user and then generates a list ordered by languages.

You can see an example of the output at my own [simonecorsi/awesome](https://github.com/simonecorsi/awesome)

## Setup
## Table of Contents

To use this action you have to create your own repository (eg: `yourname/awesome`), then create a new empty action in it and then use the [example workflow](#example-workflow) below as a starting point.
<!-- toc -->

## Inputs
- [Table of Contents](#table-of-contents)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [Configuration](#configuration)
- [`api-token`](#api-token)
- [Example workflow](#example-workflow)

### `github-token`
<!-- tocstop -->

The github workflow token is mandatory
## Documentation

### `api-token`
### Requirements

- An empty repository
- A personal github api key

### Configuration

The service can be configured setting the appropriate environment variables or writing an `.env` file.

| Variable | Description | Default |
| -------------- | ------------------------------------------- | -------------------------------- |
| `api-token` | Personal github api token. | `${{ secrets.API_TOKEN }}` |
| `github-token` | Action Token | `${{ secrets.GITHUB_TOKEN }}` |
| `github-name` | Name used for the commit, default to action | Github Action |
| `github-email` | email used for commit, default to action | actions@users.noreply.github.com |

#### `api-token`

The Personal API Access Token is mandatory to fetch stars from the API without incurring in Rate Limits.

Expand All @@ -36,8 +57,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Awesome generator
uses: simonecorsi/mawesome@lastest
uses: simonecorsi/mawesome@latest
with:
api-token: ${{ secrets.API_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-email: ${{ secrets.USER_EMAIL }}
github-name: ${{ github.repository_owner }}

```
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ inputs:
api-token:
description: 'Personal API Token'
required: true
github-name:
description: 'Name shown in the commit'
github-email:
description: 'Email shown in the commit'
runs:
using: 'node12'
main: 'index.js'

0 comments on commit 5753aef

Please sign in to comment.