fix: normalize template file loadup

This commit is contained in:
Simone Corsi
2022-05-11 10:00:38 +02:00
parent ec10b79a91
commit 445f562fb5
3 changed files with 19 additions and 17 deletions

View File

@@ -8,7 +8,6 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
<!-- toc -->
- [Table of Contents](#table-of-contents)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [Configuration](#configuration)
@@ -21,32 +20,34 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
### Requirements
- An empty repository
- A personal github api key
- 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 |
| 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 |
| `template-path` | Custom output template file ([EJS](https://ejs.co/) template engine) | [TEMPLATE.ejs](./TEMPLATE.ejs) |
| `output-filename` | Output filename | `README.md` |
#### `api-token`
The Personal API Access Token is mandatory to fetch stars from the API without incurring in Rate Limits.
You'll have to generate a [personal api token](https://github.com/settings/tokens/new) and then add
You'll have to generate a [personal api token](https://github.com/settings/tokens/new) and then add
## Example workflow
```yml
name: Update awesome list
on:
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
@@ -63,5 +64,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-email: ${{ secrets.USER_EMAIL }}
github-name: ${{ github.repository_owner }}
```